Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: erik at ehofman dot com
Target Milestone: ---
It looks like sizeof() returns an incorrect size if a union contains an aligned
member:
Consider the following code:
#include
typedef
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79319
Erik Hofman changed:
What|Removed |Added
Status|RESOLVED|CLOSED
--- Comment #2 from Erik Hofman --
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79319
--- Comment #4 from Erik Hofman ---
This was just the shortest snippet of code that showed the situation.
The reason for 32-byte alignment is that I use it with AVX code and wanted the
fastest possible assignment from a float vector.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79319
--- Comment #6 from Erik Hofman ---
Thanks for the suggestion but after thinking it through some more I came to the
conclusion I made a mistake. 32-byte alignment is only required for AVX when
using 8-float (or 4-double) vectors. Otherwise the co