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: unassig...@gcc.gnu.org

        ReportedBy: spammeup2...@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 ()

Reply via email to