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

            Bug ID: 86201
           Summary: ICE: Error reporting routines re-entered
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

With option -std=c++11 or newer, down to at least gcc-4.8,
due to a missing return value :


$ cat z1.cc
template <class U, class V>
auto fn1 (V&& v) -> decltype(U(v))
{
  return; ///
}
void fn2 ()
{
  fn1<bool>(1.0);
}


$ gcc-9-20180617 -c z1.cc
'
Internal compiler error: Error reporting routines re-entered.
0x772d1f cp_build_binary_op(unsigned int, tree_code, tree_node*, tree_node*,
int)
        ../../gcc/cp/typeck.c:4739
0x66d73b ocp_convert(tree_node*, tree_node*, int, int, int)
        ../../gcc/cp/cvt.c:836
0x6349c1 convert_like_real
        ../../gcc/cp/call.c:7118
0x63f07a perform_direct_initialization_if_possible(tree_node*, tree_node*,
bool, int)
        ../../gcc/cp/call.c:10797
0x775836 build_static_cast_1
        ../../gcc/cp/typeck.c:7039
0x776497 cp_build_c_cast(tree_node*, tree_node*, int)
        ../../gcc/cp/typeck.c:7821
0x77e646 build_functional_cast(tree_node*, tree_node*, int)
        ../../gcc/cp/typeck2.c:2131
0x71bea9 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/cp/pt.c:17864
0x7292e1 tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/cp/pt.c:14899
0x69c900 dump_template_bindings
        ../../gcc/cp/error.c:397
0x69c900 dump_substitution
        ../../gcc/cp/error.c:1525
0x69d0f8 dump_substitution
        ../../gcc/cp/cp-tree.h:5955
0x69d0f8 dump_function_decl
        ../../gcc/cp/error.c:1681
0x6a2862 decl_to_string
        ../../gcc/cp/error.c:3056
0x6a2862 cp_printer
        ../../gcc/cp/error.c:4073
0x12f9eb3 pp_format(pretty_printer*, text_info*)
        ../../gcc/pretty-print.c:1375
0x12fad10 pp_format_verbatim(pretty_printer*, text_info*)
        ../../gcc/pretty-print.c:1437
0x12fade4 pp_verbatim(pretty_printer*, char const*, ...)
        ../../gcc/pretty-print.c:1641
0x69b816 print_instantiation_full_context
        ../../gcc/cp/error.c:3464
0x69b816 maybe_print_instantiation_context
        ../../gcc/cp/error.c:3607

Reply via email to