> According to Eric: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53037#c32 > > "if (mode_align >= TYPE_ALIGN (type))" was intentional. I am > not familiar with STRICT_ALIGNMENT target and there is no > testcase to show why it is needed.
Yes, the mode promotion triggers the alignment promotion on strict-alignment targets and the specified alignment is thus equal to the default one, so the code works as intended and clears DECL_USER_ALIGN. Not very clear what to do, but the most robust approach would be to use lookup_attribute on the type. -- Eric Botcazou