https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66818
Bug ID: 66818 Summary: Wrong alignment value for attribute ((aligned)) with -miamcu Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com Target Milestone: --- attribute ((aligned)) should be 4 for -miamcu. But we get [hjl@gnu-6 gcc]$ cat /tmp/x.c /* { dg-do compile { target ia32 } } */ /* { dg-options "-O2 -mno-sse -mno-mmx -miamcu" } */ struct dummy { int x __attribute__((aligned)); }; int array[__alignof__(struct dummy) == 4 ? 1 : -1]; [hjl@gnu-6 gcc]$ ./xgcc -B./ -S -m32 -miamcu /tmp/x.c /tmp/x.c:5:5: error: size of array ‘array’ is negative int array[__alignof__(struct dummy) == 4 ? 1 : -1]; ^ [hjl@gnu-6 gcc]$