http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54916
Bug #: 54916 Summary: [4.8 Regression] wrong code with -O2 -funroll-loops -fno-rerun-cse-after-loop Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Created attachment 28435 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28435 testcase (gcc.dg/pr39794.c) Output: $ gcc -O2 -funroll-loops -fno-rerun-cse-after-loop pr39794.i $ ./a.out Aborted (gdb) p a $1 = {0, 1, 4, 2, 10, 12, 24, 44, 36, 136, 160, 344, 592, 1008, 1872, 1600} (gdb) p ref $2 = {0, 1, 4, 2, 10, 12, 24, 44, 72, 136, 232, 416, 736, 1296, 2304, 2032} Binary is fine when compiled without -fno-rerun-cse-after-loop Tested revisions: r192388 - fail r191586 - fail 4.7 r191640 - OK