[Bug lto/48042] New: lto segfaults while building Qt 4.7.2 with -g -flto -fwhole-program

bero at arklinux dot org gcc-bugzilla@gcc.gnu.org
Wed Mar 9 11:23:00 GMT 2011


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

           Summary: lto segfaults while building Qt 4.7.2 with -g -flto
                    -fwhole-program
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bero@arklinux.org


Trying to build Qt 4.7.2 with -g -flto for the library and -g -flto
-fwhole-program for the tools crashes gcc.

[bero@matterhorn uic3]$ g++ -Wl,-rpath-link,/usr/src/ark/BUILD/qt/lib -m64 -O2
-g -Wl,-rpath,/usr/lib64/qt4-embedded/lib
-Wl,-rpath,/usr/lib64/qt4-embedded/lib -flto -fwhole-program -o
../../../bin/uic3 .obj/release-static-emb-x86_64/customwidgetsinfo.o
.obj/release-static-emb-x86_64/databaseinfo.o
.obj/release-static-emb-x86_64/driver.o
.obj/release-static-emb-x86_64/treewalker.o
.obj/release-static-emb-x86_64/ui4.o .obj/release-static-emb-x86_64/validator.o
.obj/release-static-emb-x86_64/cppextractimages.o
.obj/release-static-emb-x86_64/cppwritedeclaration.o
.obj/release-static-emb-x86_64/cppwriteicondata.o
.obj/release-static-emb-x86_64/cppwriteicondeclaration.o
.obj/release-static-emb-x86_64/cppwriteiconinitialization.o
.obj/release-static-emb-x86_64/cppwriteincludes.o
.obj/release-static-emb-x86_64/cppwriteinitialization.o
.obj/release-static-emb-x86_64/main.o
.obj/release-static-emb-x86_64/ui3reader.o
.obj/release-static-emb-x86_64/parser.o
.obj/release-static-emb-x86_64/domtool.o
.obj/release-static-emb-x86_64/object.o
.obj/release-static-emb-x86_64/subclassing.o
.obj/release-static-emb-x86_64/form.o
.obj/release-static-emb-x86_64/converter.o
.obj/release-static-emb-x86_64/widgetinfo.o
.obj/release-static-emb-x86_64/embed.o .obj/release-static-emb-x86_64/qt3to4.o
.obj/release-static-emb-x86_64/deps.o .obj/release-static-emb-x86_64/uic.o   
-L/usr/src/ark/BUILD/qt/lib -lQt3Support -L/usr/src/ark/BUILD/qt/lib -lQtSql
-lsqlite3 -lQtXml -lQtGui -ljpeg -lmng -ltiff -lpng -lfreetype -lQtNetwork
-lssl -lcrypto -lQtCore -lz -lm -ldl -pthread -lgthread-2.0 -lrt -lglib-2.0
-lpthread
lto1: 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

This is with yesterday's gcc svn (rev. 170774).

It works (and actually produces a working binary) if I omit -g. Replacing -g
with -ggdb or -gdrawf-4 doesn't change anything.



More information about the Gcc-bugs mailing list