public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/56495] New: ICE in lto_output_tree with -g -flto -O2
@ 2013-03-01 14:40 spammeup2011 at googlemail dot com
  2013-03-01 14:47 ` [Bug lto/56495] " spammeup2011 at googlemail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: spammeup2011 at googlemail dot com @ 2013-03-01 14:40 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56495
           Summary: ICE in lto_output_tree with -g -flto -O2
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: spammeup2011@googlemail.com


GCC segfaults while compiling the attached code from Parma Polyhedra Library.
The testcase is huge, but reducing it led to a testcase that only failed in 1
of 10 cases or so. The error message sometimes changed to "tree code '(some
garbage)' is not supported in LTO streams" but i could not reproduce that one. 
GCC 4.8.0 20130301 fails while GCC 4.7.2 works.

Compiler output:
gcc -O2 -flto -g -s ppl.ii 
ppl_c_Rational_Box.cc: In function
'Parma_Polyhedra_Library::operator>(Parma_Polyhedra_Library::Linear_Expression
const&, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> const&)':
ppl_c_Rational_Box.cc:1781:8302: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

Backtrace:
Program received signal SIGSEGV, Segmentation fault.
lto_output_tree (ob=0x1ece9d0, expr=0xe000000000049, ref_p=true, 
    this_ref_p=true) at ../.././gcc/lto-streamer-out.c:371
371    ../.././gcc/lto-streamer-out.c: No such file or directory.
(gdb) bt
#0  lto_output_tree (ob=0x1ece9d0, expr=0xe000000000049, ref_p=true, 
    this_ref_p=true) at ../.././gcc/lto-streamer-out.c:371
#1  0x00000000009ed78b in write_ts_block_tree_pointers (ref_p=true, 
    expr=0x7ffff491ca80, ob=0x1ece9d0) at ../.././gcc/tree-streamer-out.c:760
#2  streamer_write_tree_body (ob=0x1ece9d0, expr=0x7ffff491ca80, 
    ref_p=<optimized out>) at ../.././gcc/tree-streamer-out.c:887
#3  0x00000000008194fd in lto_write_tree (ref_p=true, expr=0x7ffff491ca80, 
    ob=0x1ece9d0) at ../.././gcc/lto-streamer-out.c:321
#4  lto_output_tree (ob=0x1ece9d0, expr=0x7ffff491ca80, ref_p=<optimized out>, 
    this_ref_p=<optimized out>) at ../.././gcc/lto-streamer-out.c:410
#5  0x00000000009ed176 in write_ts_common_tree_pointers (ref_p=true, 
    expr=0x7fffe85aa0f0, ob=0x1ece9d0) at ../.././gcc/tree-streamer-out.c:514
#6  streamer_write_tree_body (ob=0x1ece9d0, expr=0x7fffe85aa0f0, 
    ref_p=<optimized out>) at ../.././gcc/tree-streamer-out.c:845
#7  0x00000000008194fd in lto_write_tree (ref_p=true, expr=0x7fffe85aa0f0, 
    ob=0x1ece9d0) at ../.././gcc/lto-streamer-out.c:321
#8  lto_output_tree (ob=ob@entry=0x1ece9d0, expr=0x7fffe85aa0f0, 
    ref_p=ref_p@entry=true, this_ref_p=this_ref_p@entry=true)
    at ../.././gcc/lto-streamer-out.c:410
#9  0x00000000009ed82b in write_ts_exp_tree_pointers (ref_p=<optimized out>, 
    expr=<optimized out>, ob=<optimized out>)
    at ../.././gcc/tree-streamer-out.c:747
#10 streamer_write_tree_body (ob=0x1ece9d0, expr=0x7fffe858d880, 
---Type <return> to continue, or q <return> to quit---
    ref_p=<optimized out>) at ../.././gcc/tree-streamer-out.c:884
#11 0x00000000008194fd in lto_write_tree (ref_p=true, expr=0x7fffe858d880, 
    ob=0x1ece9d0) at ../.././gcc/lto-streamer-out.c:321
#12 lto_output_tree (ob=0x1ece9d0, expr=0x7fffe858d880, ref_p=<optimized out>, 
    this_ref_p=<optimized out>) at ../.././gcc/lto-streamer-out.c:410
#13 0x00000000009ed7f5 in write_ts_exp_tree_pointers (ref_p=<optimized out>, 
    expr=<optimized out>, ob=<optimized out>)
    at ../.././gcc/tree-streamer-out.c:746
#14 streamer_write_tree_body (ob=0x1ece9d0, expr=0x7fffe85a39d8, 
    ref_p=<optimized out>) at ../.././gcc/tree-streamer-out.c:884
#15 0x00000000008194fd in lto_write_tree (ref_p=true, expr=0x7fffe85a39d8, 
    ob=0x1ece9d0) at ../.././gcc/lto-streamer-out.c:321
#16 lto_output_tree (ob=0x1ece9d0, expr=0x7fffe85a39d8, ref_p=<optimized out>, 
    this_ref_p=<optimized out>) at ../.././gcc/lto-streamer-out.c:410
#17 0x00000000009ed7f5 in write_ts_exp_tree_pointers (ref_p=<optimized out>, 
    expr=<optimized out>, ob=<optimized out>)
    at ../.././gcc/tree-streamer-out.c:746
#18 streamer_write_tree_body (ob=0x1ece9d0, expr=0x7fffe859a300, 
    ref_p=<optimized out>) at ../.././gcc/tree-streamer-out.c:884
#19 0x00000000008194fd in lto_write_tree (ref_p=true, expr=0x7fffe859a300, 
    ob=0x1ece9d0) at ../.././gcc/lto-streamer-out.c:321
#20 lto_output_tree (ob=ob@entry=0x1ece9d0, expr=0x7fffe859a300, 
    ref_p=ref_p@entry=true, this_ref_p=this_ref_p@entry=true)
---Type <return> to continue, or q <return> to quit---
    at ../.././gcc/lto-streamer-out.c:410
#21 0x00000000009ed936 in write_ts_decl_common_tree_pointers (ref_p=true, 
    expr=0x7fffe85ac5f0, ob=0x1ece9d0) at ../.././gcc/tree-streamer-out.c:584
#22 streamer_write_tree_body (ob=0x1ece9d0, expr=0x7fffe85ac5f0, 
    ref_p=<optimized out>) at ../.././gcc/tree-streamer-out.c:857
#23 0x00000000008194fd in lto_write_tree (ref_p=true, expr=0x7fffe85ac5f0, 
    ob=0x1ece9d0) at ../.././gcc/lto-streamer-out.c:321
#24 lto_output_tree (ob=0x1ece9d0, expr=0x7fffe85ac5f0, ref_p=<optimized out>, 
    this_ref_p=<optimized out>) at ../.././gcc/lto-streamer-out.c:410
#25 0x0000000000c468bf in output_gimple_stmt (stmt=0x7fffe7f80740, 
    ob=0x1ece9d0) at ../.././gcc/gimple-streamer-out.c:140
#26 output_bb (ob=0x1ece9d0, bb=0x7fffe7f6ea90, fn=0x7ffff1cbae60)
    at ../.././gcc/gimple-streamer-out.c:193
#27 0x000000000081a446 in output_function (node=0x7ffff1cdd6f0)
    at ../.././gcc/lto-streamer-out.c:823
#28 lto_output () at ../.././gcc/lto-streamer-out.c:987
#29 0x0000000000843bc8 in ipa_write_summaries_2 (
    pass=0x13d5560 <pass_ipa_lto_gimple_out>, state=0x1e859b0)
    at ../.././gcc/passes.c:2411
#30 0x0000000000844ac0 in ipa_write_summaries_1 (encoder=<optimized out>)
    at ../.././gcc/passes.c:2441
#31 ipa_write_summaries () at ../.././gcc/passes.c:2495
#32 0x00000000006a596c in ipa_passes () at ../.././gcc/cgraphunit.c:1905
---Type <return> to continue, or q <return> to quit---
#33 compile () at ../.././gcc/cgraphunit.c:1991
#34 0x00000000006a5a7a in finalize_compilation_unit ()
    at ../.././gcc/cgraphunit.c:2119
#35 0x000000000057a269 in cp_write_global_declarations ()
    at ../.././gcc/cp/decl2.c:4318
#36 0x00000000008d2a7d in compile_file () at ../.././gcc/toplev.c:557
#37 0x00000000008d44ea in do_compile () at ../.././gcc/toplev.c:1876
#38 toplev_main (argc=23, argv=0x7fffffffdab8) at ../.././gcc/toplev.c:1952
#39 0x0000003ed9421735 in __libc_start_main () from /lib64/libc.so.6
#40 0x0000000000518519 in _start ()


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

* [Bug lto/56495] ICE in lto_output_tree with -g -flto -O2
  2013-03-01 14:40 [Bug lto/56495] New: ICE in lto_output_tree with -g -flto -O2 spammeup2011 at googlemail dot com
@ 2013-03-01 14:47 ` spammeup2011 at googlemail dot com
  2013-03-04 15:33 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: spammeup2011 at googlemail dot com @ 2013-03-01 14:47 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Florian Meyer <spammeup2011 at googlemail dot com> 2013-03-01 14:47:03 UTC ---
Created attachment 29562
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29562
Zipped Preprocessed source

Preprocessed source in zipped form. The file is 3mb unpacked.


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

* [Bug lto/56495] ICE in lto_output_tree with -g -flto -O2
  2013-03-01 14:40 [Bug lto/56495] New: ICE in lto_output_tree with -g -flto -O2 spammeup2011 at googlemail dot com
  2013-03-01 14:47 ` [Bug lto/56495] " spammeup2011 at googlemail dot com
@ 2013-03-04 15:33 ` rguenth at gcc dot gnu.org
  2013-03-06 21:34 ` spammeup2011 at googlemail dot com
  2013-03-07 10:06 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-03-04 15:33 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-03-04
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-04 15:33:20 UTC ---
Can you please specify how you configured GCC?  It seems to work for
me, that is - I get past compile-stage where I then have to add -r -nostdlib
to continue with WPA and LTRANS stage which also work fine for me.

Can you also provide the output you get when adding -v to the command that
fails for you?

Thanks.


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

* [Bug lto/56495] ICE in lto_output_tree with -g -flto -O2
  2013-03-01 14:40 [Bug lto/56495] New: ICE in lto_output_tree with -g -flto -O2 spammeup2011 at googlemail dot com
  2013-03-01 14:47 ` [Bug lto/56495] " spammeup2011 at googlemail dot com
  2013-03-04 15:33 ` rguenth at gcc dot gnu.org
@ 2013-03-06 21:34 ` spammeup2011 at googlemail dot com
  2013-03-07 10:06 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: spammeup2011 at googlemail dot com @ 2013-03-06 21:34 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Florian Meyer <spammeup2011 at googlemail dot com> 2013-03-06 21:34:11 UTC ---
Seems i can only reproduce it with the live package provided by Gentoo , even
though it does not apply any patches. If I configure and compile the current
GCC trunk by hand and with the same options the crash does not appear. I'm not
sure where the difference comes from but it seems to have been a false alarm.
Sorry for the waste of time. 

LC_ALL="C" gcc -v -s ppl.ii -O2 -flto -g
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0-pre9999/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/mnt/portage/temp/portage/sys-devel/gcc-4.8.0_pre9999/work/gcc-4.8.0-9999/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0-pre9999
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --enable-lto --enable-nls --without-included-gettext
--with-system-zlib --enable-obsolete --disable-werror --enable-secureplt
--enable-multilib --with-multilib-list=m32,m64 --enable-libmudflap
--disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.0-pre9999/python
--enable-checking=release --disable-libgcj --enable-libstdcxx-time
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.0_pre9999'
Thread model: posix
gcc version 4.8.0-pre9999 20130304 (experimental) commit
050bae72218bcca4e1feddf8bde385097df42f72 (Gentoo 4.8.0_pre9999) 
COLLECT_GCC_OPTIONS='-v' '-s' '-O2' '-flto' '-g' '-mtune=generic'
'-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/cc1plus -fpreprocessed
ppl.ii -quiet -dumpbase ppl.ii -mtune=generic -march=x86-64 -auxbase ppl -g -O2
-version -flto -o /tmp/cc6I9l3w.s
GNU C++ (Gentoo 4.8.0_pre9999) version 4.8.0-pre9999 20130304 (experimental)
commit 050bae72218bcca4e1feddf8bde385097df42f72 (x86_64-pc-linux-gnu)
    compiled by GNU C version 4.8.0-pre9999 20130304 (experimental) commit
050bae72218bcca4e1feddf8bde385097df42f72, GMP version 5.1.0, MPFR version
3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Gentoo 4.8.0_pre9999) version 4.8.0-pre9999 20130304 (experimental)
commit 050bae72218bcca4e1feddf8bde385097df42f72 (x86_64-pc-linux-gnu)
    compiled by GNU C version 4.8.0-pre9999 20130304 (experimental) commit
050bae72218bcca4e1feddf8bde385097df42f72, GMP version 5.1.0, MPFR version
3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 21b18ee7394db7ae76601a5df9e565da
ppl_c_Rational_Box.cc: In function
'Parma_Polyhedra_Library::operator>(Parma_Polyhedra_Library::Linear_Expression
const&, __gmp_expr<__mpz_struct [1], __mpz_struct [1]> const&)':
ppl_c_Rational_Box.cc:1781:8302: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.


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

* [Bug lto/56495] ICE in lto_output_tree with -g -flto -O2
  2013-03-01 14:40 [Bug lto/56495] New: ICE in lto_output_tree with -g -flto -O2 spammeup2011 at googlemail dot com
                   ` (2 preceding siblings ...)
  2013-03-06 21:34 ` spammeup2011 at googlemail dot com
@ 2013-03-07 10:06 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-03-07 10:06 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-07 10:05:14 UTC ---
Thanks for verifying.


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

end of thread, other threads:[~2013-03-07 10:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 14:40 [Bug lto/56495] New: ICE in lto_output_tree with -g -flto -O2 spammeup2011 at googlemail dot com
2013-03-01 14:47 ` [Bug lto/56495] " spammeup2011 at googlemail dot com
2013-03-04 15:33 ` rguenth at gcc dot gnu.org
2013-03-06 21:34 ` spammeup2011 at googlemail dot com
2013-03-07 10:06 ` 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).