[Bug tree-optimization/54916] New: [4.8 Regression] wrong code with -O2 -funroll-loops -fno-rerun-cse-after-loop

zsojka at seznam dot cz gcc-bugzilla@gcc.gnu.org
Fri Oct 12 19:19:00 GMT 2012


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: unassigned@gcc.gnu.org
        ReportedBy: zsojka@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



More information about the Gcc-bugs mailing list