From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15350 invoked by alias); 29 Mar 2013 05:40:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15320 invoked by uid 48); 29 Mar 2013 05:40:13 -0000 From: "miles at gnu dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/56775] New: -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition") Date: Fri, 29 Mar 2013 05:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: miles at gnu dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-03/txt/msg02155.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56775 Bug #: 56775 Summary: -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition") Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned@gcc.gnu.org ReportedBy: miles@gnu.org If I compile my program with _both_ options "-flto" and "-fprofile-generate", I get a link-time compile error. Using either "-flto" or "-fprofile-generate" _separately_ seems to work correctly. Compiler version is: g++ (Debian 20130316-1) 4.8.0 20130316 (experimental) [trunk revision 196694] I'm not exactly sure how to cut this down...trivial test cases don't seem to have the same problem. A transcript of the final link (the options passed when compiling each object file are similar, minus libraries etc): % make V=1 EXTRA_COMPILE_FLAGS=-fprofile-generate make all-am make[1]: Entering directory `/home/miles/src/snogray/snogray' g++-snapshot -O3 -fomit-frame-pointer -flto -ffast-math -march=native -mfpmath=sse -g -std=c++11 -Wall -Wextra -Winit-self -Wdouble-promotion -pedantic-errors -Wno-long-long -fprofile-generate -fno-finite-math-only -ftrapping-math -fno-associative-math -ffunction-sections -pthread -Wl,--icf=all -o snogray snogray.o recover-image.o libsnoglua.a libsnograw.a liblpeg.a -L/usr//lib -lluajit-5.1 libsnogrdrive.a libsnogloaders.a -l3ds libsnogmat.a libsnogsurf.a libsnoglight.a libsnogrender.a libsnogtex.a libsnogspace.a libsnogscene.a libsnogimagecli.a libsnogimage.a -lpng12 -pthread -lIlmImf -lz -lImath -lHalf -lIex -lIlmThread -ljpeg -lnetpbm libsnogcolor.a libsnogcli.a libsnogutil.a lto1: internal compiler error: in add_symbol_to_partition, at lto/lto-partition.c:284 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. lto-wrapper: g++ returned 1 exit status /usr/bin/ld: fatal error: lto-wrapper failed collect2: error: ld returned 1 exit status make[1]: *** [snogray] Error 1 make[1]: Leaving directory `/home/miles/src/snogray/snogray' make: *** [all] Error 2