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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That change was completely intentional, to fix Solaris/x86 etc.
If there is not an efficient aligned alloc, we don't want struct
gomp_work_share to require 64-byte alignment (because normal allocator can't
handle that and the emulated allocator is too costly) and just want to make
sure the two parts are 64-bytes appart.
The structure contains long long members, but sure, on ia32 long long has
smaller alignment in structures than __alignof__(long long).
Now, not really sure why does this matter if struct gomp_workshare is malloced,
the whole struct should get aligned to whatever malloc guarantees and that
better should include long long alignment.
Is this about
  struct gomp_work_share work_shares[8];
in struct gomp_team then?  We could for the #ifndef
GOMP_USE_ALIGNED_WORK_SHARES
case perhaps add __attribute__((aligned (MAX (__alignof__ (struct
gomp_work_share), __alignof__(long long)))) or so?

Reply via email to