https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116357
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |accepts-invalid
Priority|P3 |P2
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well, then the frontend should reject this. We reject
typedef int int64 __attribute__((aligned (8)));
int64 a[4];
but not
typedef volatile int int64 __attribute__((aligned (8)));
int64 a[4];
somehow the latter arrives as 'int' in c_build_array_type but the former
has 'int64'. This is because of grokdeclarator doing
if ((TREE_CODE (type) == ARRAY_TYPE
|| first_non_attr_kind == cdk_array)
&& TYPE_QUALS (element_type))
{
orig_qual_type = type;
type = TYPE_MAIN_VARIANT (type);
}
which not only drops the volatile qualifier from int64 but also the alignment.
This later confuses the rest of the frontend with how it treats the array.