[Bug c++/64049] New: Wrong code at -O3

bernd.edlinger at hotmail dot de gcc-bugzilla@gcc.gnu.org
Mon Nov 24 13:23:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64049

            Bug ID: 64049
           Summary: Wrong code at -O3
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de

the attached C++ program is mis-compiled with recent GCC trunk at -O3

g++ -O3 ValueHelper1.cpp ValueHelper2.cpp
./a.out
Assertion failed at ValueHelper1.cpp(9): Unexpected null pointer
Segmentation fault (core dumped)

which is not supposed to happen.

correct:
g++ -O2 ValueHelper1.cpp ValueHelper2.cpp
./a.out
text= Localized Text



More information about the Gcc-bugs mailing list