https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108437
Bug ID: 108437 Summary: [13 Regression] ICE in build_min_non_dep_op_overload, at cp/tree.cc:3710 Product: gcc Version: 13.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 20221106 and 20221120, with -std=c++23 : $ cat z1.cc struct S { static int operator[] (int x) { int a[2]; return a[x]; } }; template<class T> int f () { S s; s[0]++; return 0; } $ g++-13-20230115 -c z1.cc -std=c++23 z1.cc: In function 'int f()': z1.cc:8:6: internal compiler error: in build_min_non_dep_op_overload, at cp/tree.cc:3710 8 | s[0]++; | ^ 0xb397f7 build_min_non_dep_op_overload(tree_code, tree_node*, tree_node*, ...) ../../gcc/cp/tree.cc:3710 0x92b620 grok_array_decl(unsigned int, tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ../../gcc/cp/decl2.cc:577 0xa17963 cp_parser_postfix_open_square_expression ../../gcc/cp/parser.cc:8177 0xa2b2de cp_parser_postfix_expression ../../gcc/cp/parser.cc:7768 0xa44ddf cp_parser_unary_expression ../../gcc/cp/parser.cc:9095 0xa106ef cp_parser_cast_expression ../../gcc/cp/parser.cc:9999 0xa1101f cp_parser_binary_expression ../../gcc/cp/parser.cc:10101 0xa11da4 cp_parser_assignment_expression ../../gcc/cp/parser.cc:10444 0xa14362 cp_parser_expression ../../gcc/cp/parser.cc:10614 0xa18577 cp_parser_expression_statement ../../gcc/cp/parser.cc:12758 0xa26ae1 cp_parser_statement ../../gcc/cp/parser.cc:12538 0xa27de4 cp_parser_statement_seq_opt ../../gcc/cp/parser.cc:12909 0xa27ec7 cp_parser_compound_statement ../../gcc/cp/parser.cc:12861 0xa51d90 cp_parser_function_body ../../gcc/cp/parser.cc:25280 0xa51d90 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.cc:25331 0xa5240a cp_parser_function_definition_after_declarator ../../gcc/cp/parser.cc:31953 0xa5393c cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.cc:31870 0xa5393c cp_parser_init_declarator ../../gcc/cp/parser.cc:22734 0xa5713f cp_parser_single_declaration ../../gcc/cp/parser.cc:32470 0xa572a6 cp_parser_template_declaration_after_parameters ../../gcc/cp/parser.cc:32023