http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039
Summary: LLVM StringRef miscompilation with -O2 Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ism...@namtrac.org Hi; This is extracted from http://llvm.org/bugs/show_bug.cgi?id=9858 . I'll attach the testcase from Nick Lewycky. [/work/stuff]> g++ pr9858.cc [/work/stuff]> ./a.out [/work/stuff]> g++ -O2 pr9858.cc [/work/stuff]> ./a.out [1] 2459 segmentation fault ./a.out