https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89769
Bug ID: 89769 Summary: attribute((aligned(x))) array testcae run error with option -fno-tree-loop-im Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: xuzheliang at huawei dot com Target Milestone: --- >>cat pr43783.c typedef __attribute__((aligned(16))) struct { unsigned long long w[3]; } UINT192; UINT192 bid_Kx192[32]; extern void abort (void); int main() { int i = 0; unsigned long x = 0; for (i = 0; i < 32; ++i) bid_Kx192[i].w[1] = i == 1; for (i = 0; i < 32; ++i) x += bid_Kx192[1].w[1]; if (x != 32) abort (); return 0; } >>gcc -O2 pr43783.c -fno-tree-loop-im -o pr43783.exe >>./pr43783.exe Aborted