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

            Bug ID: 102414
           Summary: [12 Regression] ICE in unify_array_domain, at
                    cp/pt.c:23442
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started between 20210627 and 20210704 :


$ cat z1.cc
void f ()
{
  int a[3];
  auto (*b)[0/0] = &a;
}


$ g++-12-20210919 -c z1.cc
z1.cc: In function 'void f()':
z1.cc:4:14: warning: division by zero [-Wdiv-by-zero]
    4 |   auto (*b)[0/0] = &a;
      |             ~^~
z1.cc:4:21: internal compiler error: in unify_array_domain, at cp/pt.c:23442
    4 |   auto (*b)[0/0] = &a;
      |                     ^
0x671a18 unify_array_domain
        ../../gcc/cp/pt.c:23442
0x8160a5 unify
        ../../gcc/cp/pt.c:24013
0x815da3 unify
        ../../gcc/cp/pt.c:24319
0x814b99 unify_one_argument
        ../../gcc/cp/pt.c:22271
0x8225b6 type_unification_real
        ../../gcc/cp/pt.c:22390
0x80aea5 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ../../gcc/cp/pt.c:29807
0x732d36 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7948
0x7f3caf cp_parser_init_declarator
        ../../gcc/cp/parser.c:22665
0x7d1b52 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:15133
0x7d37c9 cp_parser_declaration_statement
        ../../gcc/cp/parser.c:14214
0x7d3e4c cp_parser_statement
        ../../gcc/cp/parser.c:12306
0x7d4cb4 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:12713
0x7d4d6f cp_parser_compound_statement
        ../../gcc/cp/parser.c:12662
0x7f2e78 cp_parser_function_body
        ../../gcc/cp/parser.c:24893
0x7f2e78 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/cp/parser.c:24944
0x7f3326 cp_parser_function_definition_after_declarator
        ../../gcc/cp/parser.c:31066
0x7f4247 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/cp/parser.c:30982
0x7f4247 cp_parser_init_declarator
        ../../gcc/cp/parser.c:22427
0x7d1b52 cp_parser_simple_declaration
        ../../gcc/cp/parser.c:15133
0x7f9a1f cp_parser_declaration
        ../../gcc/cp/parser.c:14819

Reply via email to