http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50620
Bug #: 50620 Summary: "undefined reference" errors / csmith lto testing Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: mar...@trippelsdorf.de Created attachment 25421 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25421 preprocessed testfile I ran csmith's compiler_test.pl ( http://embed.cs.utah.edu/csmith/ ) overnight: % cat compiler_test gcc -O2 -Wfatal-errors -w -flto % compiler_test.pl 0 compiler_test ... This produces roughly one "crash" file every 20 minutes. All files show linker errors of the same type e.g.: % gcc -O2 -Wfatal-errors -w -flto test.i /tmp/ccYdYNxC.ltrans1.ltrans.o:ccYdYNxC.ltrans1.o:function func_1.2254: error: undefined reference to 'g_331.2321.2276' collect2: error: ld returned 1 exit status Running without "-flto" or adding "-flto-partition=1to1" resolves the issue. I've attached one preprocessed file, that was reduced with delta.