http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48042
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW --- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-09 16:32:51 UTC --- (In reply to comment #7) > Created attachment 23605 [details] > Much smaller test case > > Small self-contained test case, source-only. > > $ tar xzf bug48042.tar.gz > $ cd bug48042 > $ ./bug48042.sh > In file included from > ../../../include/QtCore/../../src/corelib/global/qglobal.h:899:0, > from :10: > ../../../include/Qt3Support/../../src/qt3support/tools/q3glist.h: In member > function ‘count’: > ../../../include/Qt3Support/../../src/qt3support/tools/q3glist.h:161:1: > internal compiler error: Segmentation fault > Please submit a full bug report, > with preprocessed source if appropriate. > See <http://gcc.gnu.org/bugs.html> for instructions. > lto-wrapper: g++ returned 1 exit status > /usr/bin/ld: lto-wrapper failed > collect2: ld returned 1 exit status > > > The problem goes away if -g is added to the first compiler invocation as well > -- lto seems to fall over some constructs if linking is done with -g but an > object file was built without -g. Ah, yeah - that's a known problem (and hard to fix). What should work is dropping -g at link time. Basically to make your way reliably all conditional clearing in free_lang_data_in_* based on debug_info_level checks have to be dropped.