public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/56775] New: -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition")
@ 2013-03-29  5:40 miles at gnu dot org
  2013-04-02  9:00 ` [Bug lto/56775] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: miles at gnu dot org @ 2013-03-29  5:40 UTC (permalink / raw)
  To: gcc-bugs


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 <file:///usr/share/doc/gcc-snapshot/README.Bugs> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug lto/56775] -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition")
  2013-03-29  5:40 [Bug lto/56775] New: -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition") miles at gnu dot org
@ 2013-04-02  9:00 ` rguenth at gcc dot gnu.org
  2014-03-20 20:35 ` burnus at gcc dot gnu.org
  2014-03-21 10:00 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-02  9:00 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-04-02
            Version|unknown                     |4.8.0
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-02 09:00:51 UTC ---
We need a testcase.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug lto/56775] -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition")
  2013-03-29  5:40 [Bug lto/56775] New: -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition") miles at gnu dot org
  2013-04-02  9:00 ` [Bug lto/56775] " rguenth at gcc dot gnu.org
@ 2014-03-20 20:35 ` burnus at gcc dot gnu.org
  2014-03-21 10:00 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2014-03-20 20:35 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
This PR might have the same reason as PR60567.

Namely, your GCC has not been compiled on a system with working linker plugin -
and thus, lto1 is not invoked with -fresolution=.

Try compiling with "-fuse-linker-plugin" - if that gives an error, try a GCC
which has been configured with --with-plugin-ld= pointing to a newer Binutils -
2.21 or newer. If that helps, it is a duplicate of PR60567.

If it doesn't help: Create a reduced test case as described at
http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction#Reducing_LTO_bugs


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug lto/56775] -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition")
  2013-03-29  5:40 [Bug lto/56775] New: -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition") miles at gnu dot org
  2013-04-02  9:00 ` [Bug lto/56775] " rguenth at gcc dot gnu.org
  2014-03-20 20:35 ` burnus at gcc dot gnu.org
@ 2014-03-21 10:00 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-21 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Same spot of the ICE as 60567.

*** This bug has been marked as a duplicate of bug 60567 ***


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-21 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-29  5:40 [Bug lto/56775] New: -flto and -fprofile-generate together result in a link-time internal compiler error (in "add_symbol_to_partition") miles at gnu dot org
2013-04-02  9:00 ` [Bug lto/56775] " rguenth at gcc dot gnu.org
2014-03-20 20:35 ` burnus at gcc dot gnu.org
2014-03-21 10:00 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).