http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46315

           Summary: gcc-4.5.1 -O2 -fno-strict-overflow causes bad code
                    generation
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zo...@gentoo.org


Created attachment 22294
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22294
testcase

If we disable -fstrict-overflow in the -O2 optimization the testcase segfault
but works fine with -O1 or -fstrict-overflow on in the -O2 optimization.
fl...@yamato mytmpfs % gcc -O2 -fno-strict-overflow testcase.c -o testcase
fl...@yamato mytmpfs % ./testcase
0x400770
0x2
zsh: segmentation fault (core dumped)  ./testcase

Reply via email to