https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85240

            Bug ID: 85240
           Summary: [6/7/8 Regression] ICE with function without deduced
                    return type
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, lto
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

The following valid code snippet (compiled with "-flto") triggers an ICE
since GCC 5.1.0:

=====================
auto foo();

void bar()
{
  using ::foo;
}
=====================

during IPA pass: fnsummary
bug.cc:6:1: internal compiler error: tree code 'template_type_parm' is not
supported in LTO streams
 }
 ^
0xd8e523 lto_write_tree
        ../../gcc/gcc/lto-streamer-out.c:442
0xd8e523 lto_output_tree_1
        ../../gcc/gcc/lto-streamer-out.c:483
0xd8e523 DFS::DFS(output_block*, tree_node*, bool, bool, bool)
        ../../gcc/gcc/lto-streamer-out.c:670
0xd8f42d lto_output_tree(output_block*, tree_node*, bool, bool)
        ../../gcc/gcc/lto-streamer-out.c:1642
0xd84b92 write_global_stream
        ../../gcc/gcc/lto-streamer-out.c:2492
0xd8d3ee lto_output_decl_state_streams(output_block*, lto_out_decl_state*)
        ../../gcc/gcc/lto-streamer-out.c:2539
0xd8d3ee produce_asm_for_decls()
        ../../gcc/gcc/lto-streamer-out.c:2872
0xdeb49f write_lto
        ../../gcc/gcc/passes.c:2613
0xdeeb8e ipa_write_summaries_1
        ../../gcc/gcc/passes.c:2674
0xdeeb8e ipa_write_summaries()
        ../../gcc/gcc/passes.c:2734
0xaf2a52 ipa_passes
        ../../gcc/gcc/cgraphunit.c:2468
0xaf2a52 symbol_table::compile()
        ../../gcc/gcc/cgraphunit.c:2558
0xaf4a89 symbol_table::compile()
        ../../gcc/gcc/cgraphunit.c:2537
0xaf4a89 symbol_table::finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2717
Please submit a full bug report, [etc.]

Reply via email to