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

            Bug ID: 97973
           Summary: [10/11 Regression] ICE in tsubst_copy_and_build, at
                    cp/pt.c:19577
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started with r10 between 20200119 and 20200126 :


$ cat z1.cc
void a (const int& b);
template <class c> int d { a[1](1.); }


$ g++-11-20201122 -c z1.cc
z1.cc:2:35: internal compiler error: in tsubst_copy_and_build, at cp/pt.c:19577
    2 | template <class c> int d { a[1](1.); }
      |                                   ^
0x768e61 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/cp/pt.c:19577
0x7688d2 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/cp/pt.c:19477
0x6817cc fold_non_dependent_expr_template
        ../../gcc/cp/constexpr.c:7177
0x6df205 fold_for_warn(tree_node*)
        ../../gcc/cp/expr.c:409
0x800ebc check_function_restrict
        ../../gcc/c-family/c-common.c:5468
0x800ebc check_function_arguments(unsigned int, tree_node const*, tree_node
const*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*)
        ../../gcc/c-family/c-common.c:5840
0x7c9607 cp_build_function_call_vec(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int, tree_node*)
        ../../gcc/cp/typeck.c:4024
0x79689f finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/cp/semantics.c:2728
0x73f005 cp_parser_postfix_expression
        ../../gcc/cp/parser.c:7556
0x7471b5 cp_parser_unary_expression
        ../../gcc/cp/parser.c:8659
0x7211ff cp_parser_cast_expression
        ../../gcc/cp/parser.c:9562
0x721a32 cp_parser_binary_expression
        ../../gcc/cp/parser.c:9664
0x7231c0 cp_parser_assignment_expression
        ../../gcc/cp/parser.c:9968
0x7221ad cp_parser_constant_expression
        ../../gcc/cp/parser.c:10264
0x722711 cp_parser_initializer_clause
        ../../gcc/cp/parser.c:23723
0x7228b4 cp_parser_initializer_list
        ../../gcc/cp/parser.c:24002
0x7228b4 cp_parser_braced_list
        ../../gcc/cp/parser.c:23764
0x726082 cp_parser_initializer
        ../../gcc/cp/parser.c:23681
0x74e50e cp_parser_init_declarator
        ../../gcc/cp/parser.c:21323
0x751014 cp_parser_single_declaration
        ../../gcc/cp/parser.c:29997

Reply via email to