https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99143
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-02-17 Status|UNCONFIRMED |WAITING Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- are you complaining that the objects j and z are aligned in the object file as 8 bytes? Or that aj, az have the value of 1? Both are valid things to do. This is the code which does exactly that GCC: /* Align definitions of arrays, unions and structures so that initializations and copies can be made more efficient. This is not ABI-changing, so it only affects places where we can see the definition. Increasing the alignment tends to introduce padding, so don't do this when optimizing for size/conserving stack space. */ #define AARCH64_EXPAND_ALIGNMENT(COND, EXP, ALIGN) \ (((COND) && ((ALIGN) < BITS_PER_WORD) \ && (TREE_CODE (EXP) == ARRAY_TYPE \ || TREE_CODE (EXP) == UNION_TYPE \ || TREE_CODE (EXP) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN))