https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102838

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:17da2c7425ea1f5bf417b954f444dbe1f1618a1c

commit r12-5362-g17da2c7425ea1f5bf417b954f444dbe1f1618a1c
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Nov 18 09:10:40 2021 +0100

    libgomp: Ensure that either gomp_team is properly aligned [PR102838]

    struct gomp_team has struct gomp_work_share array inside of it.
    If that latter structure has 64-byte aligned member in the middle,
    the whole struct gomp_team needs to be 64-byte aligned, but we weren't
    allocating it using gomp_aligned_alloc.

    This patch fixes that, except that on gcn team_malloc is special, so
    I've instead decided at least for now to avoid using aligned member
    and use the padding instead on gcn.

    2021-11-18  Jakub Jelinek  <ja...@redhat.com>

            PR libgomp/102838
            * libgomp.h (GOMP_USE_ALIGNED_WORK_SHARES): Define if
            GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined and __AMDGCN__ is not.
            (struct gomp_work_share): Use GOMP_USE_ALIGNED_WORK_SHARES instead
of
            GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC.
            * work.c (alloc_work_share, gomp_work_share_start): Likewise.
            * team.c (gomp_new_team): If GOMP_USE_ALIGNED_WORK_SHARES, use
            gomp_aligned_alloc instead of team_malloc.

Reply via email to