public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/50338] New: ICE Linking with -flto
@ 2011-09-08 21:47 James.W.Mckelvey at jpl dot nasa.gov
  2011-09-09  7:24 ` [Bug lto/50338] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: James.W.Mckelvey at jpl dot nasa.gov @ 2011-09-08 21:47 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50338
           Summary: ICE Linking with -flto
    Classification: Unclassified
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: James.W.Mckelvey@jpl.nasa.gov


When I compile and link with -flto, I get this error:

make[1]: Entering directory `/home/mckelvey/PD/testsuite'
rm -f stest0.exe
/usr/local/bin/g++  -O3 -DNDEBUG      -DUSE_INTL=1 -DUSE_MUTEX=1
-findirect-inlining -flto -pedantic -std=gnu++0x -ansi -fno-common -Wall
-Wold-style-cast -Wsign-promo -Wpointer-arith -Wundef -Wwrite-strings
-Winvalid-pch -Woverloaded-virtual -Wcast-qual -Wextra -Wredundant-decls
-Wshadow -Wcast-align -Wcomment -fstrict-aliasing -Winit-self
-Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wlogical-op -Wconversion
-Wsign-conversion -Wmissing-declarations -Wdeprecated -ftree-switch-conversion
-Wuninitialized -Wparentheses -Wunused -fvisibility-inlines-hidden -MMD     
-fimplicit-templates  -L.. -o stest0.exe stest0.o -lPatternDriver  -lpthread
lto1: internal compiler error: in lto_balanced_map, at lto/lto.c:1721
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /usr/local/bin/g++ returned 1 exit status
collect2: error: lto-wrapper returned 1 exit status
make[1]: *** [stest0.exe] Error 1

Since this is a link error, I don't know what you need to debug this. The files
will be large.

g++ is very recent. I tried building with --enable-checking=none, but that
gives a segmentation fault instead of an ICE.



uname -a
Linux Mushroom 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011
x86_64 x86_64 x86_64 GNU/Linux

g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-redhat-linux/4.7.0/lto-wrapper
Target: x86_64-redhat-linux
Configured with: /home/mckelvey/cvsroot/gcc/configure --verbose --disable-nls
--enable-lto --with-mpfr=/usr/local --with-gmp=/usr/local --with-mpc=/usr/local
--with-ppl=/usr/local --with-cloog=/usr/local --enable-cloog-backend=isl
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object --disable-dssi
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
--enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 20110907 (experimental) (GCC) 

BUILDING:
alias CONFIGURECVS='export CC=gcc ; /home/mckelvey/cvsroot/gcc/configure
--verbose --disable-nls --enable-lto --with-mpfr=/usr/local
--with-gmp=/usr/local --with-mpc=/usr/local --with-ppl=/usr/local
--with-cloog=/usr/local --enable-cloog-backend=isl --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --disable-dssi --with-tune=generic
--with-arch_32=i686 --build=x86_64-redhat-linux --enable-languages=c,c++ 2>&1 |
tee clog'

alias BUILD='nice make CFLAGS='\'''\'' BOOT_CFLAGS='\'''\'' LIBCFLAGS='\''-g
-O'\'' CXXFLAGS='\''-O'\'' LIBCXXFLAGS='\''-g -O'\'' 2>&1 | tee log'


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

* [Bug lto/50338] ICE Linking with -flto
  2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
@ 2011-09-09  7:24 ` rguenth at gcc dot gnu.org
  2011-09-09  8:35   ` Jan Hubicka
  2011-09-09  8:43 ` hubicka at ucw dot cz
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-09-09  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
            Version|lto                         |4.7.0
           Keywords|                            |lto
   Last reconfirmed|                            |2011-09-09
                 CC|                            |hubicka at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-09 07:23:09 UTC ---
Do any of the libraries you link with have LTO information or is it just
stest0.o?
If so, can you attach preprocessed source for that?

Honza, does the ICE ring any bell?


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

* Re: [Bug lto/50338] ICE Linking with -flto
  2011-09-09  7:24 ` [Bug lto/50338] " rguenth at gcc dot gnu.org
@ 2011-09-09  8:35   ` Jan Hubicka
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Hubicka @ 2011-09-09  8:35 UTC (permalink / raw)
  To: rguenth at gcc dot gnu.org; +Cc: gcc-bugs

> Honza, does the ICE ring any bell?
I don't recall seeing it previously. The check tests that partition contains only analyzed nodes,
so it should not be that hard to track down who adds the unanalyzed one.  I will try to do bit
of proofreading today in bus.

Honza


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

* [Bug lto/50338] ICE Linking with -flto
  2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
  2011-09-09  7:24 ` [Bug lto/50338] " rguenth at gcc dot gnu.org
@ 2011-09-09  8:43 ` hubicka at ucw dot cz
  2011-09-09 16:04 ` James.W.Mckelvey at jpl dot nasa.gov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: hubicka at ucw dot cz @ 2011-09-09  8:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> 2011-09-09 08:34:48 UTC ---
> Honza, does the ICE ring any bell?
I don't recall seeing it previously. The check tests that partition contains
only analyzed nodes,
so it should not be that hard to track down who adds the unanalyzed one.  I
will try to do bit
of proofreading today in bus.

Honza


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

* [Bug lto/50338] ICE Linking with -flto
  2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
  2011-09-09  7:24 ` [Bug lto/50338] " rguenth at gcc dot gnu.org
  2011-09-09  8:43 ` hubicka at ucw dot cz
@ 2011-09-09 16:04 ` James.W.Mckelvey at jpl dot nasa.gov
  2011-09-11  9:42 ` hubicka at ucw dot cz
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: James.W.Mckelvey at jpl dot nasa.gov @ 2011-09-09 16:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from James McKelvey <James.W.Mckelvey at jpl dot nasa.gov> 2011-09-09 15:45:33 UTC ---
(In reply to comment #1)
> Do any of the libraries you link with have LTO information or is it just
> stest0.o?
> If so, can you attach preprocessed source for that?
> 
> Honza, does the ICE ring any bell?

All the source in my project's library is built with -flto.

This same basic code worked with LTO before, shortly after LTO
first came out. This is the first time I've tried it on a 64-bit OS.

I can attach the preprocessed source for stest0.o, but I won't be able to do
that until Monday.

Also, all of my test executables see the same problem.


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

* [Bug lto/50338] ICE Linking with -flto
  2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
                   ` (2 preceding siblings ...)
  2011-09-09 16:04 ` James.W.Mckelvey at jpl dot nasa.gov
@ 2011-09-11  9:42 ` hubicka at ucw dot cz
  2011-09-12  4:52 ` James.W.Mckelvey at jpl dot nasa.gov
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: hubicka at ucw dot cz @ 2011-09-11  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> 2011-09-11 09:36:55 UTC ---
> All the source in my project's library is built with -flto.
> 
> This same basic code worked with LTO before, shortly after LTO
> first came out. This is the first time I've tried it on a 64-bit OS.

as a workaround, you could probably use -flto-partition=none.  If whole project
is build with LTO, you need to figure out what files are needed to reproduce
the problem. Or if it is easy for you to build patched GCC, I can provide you
patch with some extra sanity checks, so we can work out what happens.


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

* [Bug lto/50338] ICE Linking with -flto
  2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
                   ` (3 preceding siblings ...)
  2011-09-11  9:42 ` hubicka at ucw dot cz
@ 2011-09-12  4:52 ` James.W.Mckelvey at jpl dot nasa.gov
  2011-09-12 15:21 ` James.W.Mckelvey at jpl dot nasa.gov
  2013-11-10 19:35 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 9+ messages in thread
From: James.W.Mckelvey at jpl dot nasa.gov @ 2011-09-12  4:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from James McKelvey <James.W.Mckelvey at jpl dot nasa.gov> 2011-09-12 00:47:13 UTC ---
(In reply to comment #4)
> > All the source in my project's library is built with -flto.
> > 
> > This same basic code worked with LTO before, shortly after LTO
> > first came out. This is the first time I've tried it on a 64-bit OS.
> 
> as a workaround, you could probably use -flto-partition=none.  If whole project
> is build with LTO, you need to figure out what files are needed to reproduce
> the problem. Or if it is easy for you to build patched GCC, I can provide you
> patch with some extra sanity checks, so we can work out what happens.

Jan,

Send me some patches, I can easily rebuild GCC. Trying to find a small
test-case out of the project sounds like it would take too much time, more time
than I can take right now.


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

* [Bug lto/50338] ICE Linking with -flto
  2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
                   ` (4 preceding siblings ...)
  2011-09-12  4:52 ` James.W.Mckelvey at jpl dot nasa.gov
@ 2011-09-12 15:21 ` James.W.Mckelvey at jpl dot nasa.gov
  2013-11-10 19:35 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 9+ messages in thread
From: James.W.Mckelvey at jpl dot nasa.gov @ 2011-09-12 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from James McKelvey <James.W.Mckelvey at jpl dot nasa.gov> 2011-09-12 14:58:34 UTC ---
(In reply to comment #4)
> > All the source in my project's library is built with -flto.
> > 
> > This same basic code worked with LTO before, shortly after LTO
> > first came out. This is the first time I've tried it on a 64-bit OS.
> 
> as a workaround, you could probably use -flto-partition=none.  If whole project
> is build with LTO, you need to figure out what files are needed to reproduce
> the problem. Or if it is easy for you to build patched GCC, I can provide you
> patch with some extra sanity checks, so we can work out what happens.

Adding -flto-partition=none makes it work.


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

* [Bug lto/50338] ICE Linking with -flto
  2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
                   ` (5 preceding siblings ...)
  2011-09-12 15:21 ` James.W.Mckelvey at jpl dot nasa.gov
@ 2013-11-10 19:35 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-10 19:35 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
No testcase in 2 years so closing as invalid.


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

end of thread, other threads:[~2013-11-10 19:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 21:47 [Bug lto/50338] New: ICE Linking with -flto James.W.Mckelvey at jpl dot nasa.gov
2011-09-09  7:24 ` [Bug lto/50338] " rguenth at gcc dot gnu.org
2011-09-09  8:35   ` Jan Hubicka
2011-09-09  8:43 ` hubicka at ucw dot cz
2011-09-09 16:04 ` James.W.Mckelvey at jpl dot nasa.gov
2011-09-11  9:42 ` hubicka at ucw dot cz
2011-09-12  4:52 ` James.W.Mckelvey at jpl dot nasa.gov
2011-09-12 15:21 ` James.W.Mckelvey at jpl dot nasa.gov
2013-11-10 19:35 ` pinskia 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).