From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4ECE33858C53; Tue, 28 Mar 2023 18:53:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4ECE33858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680029602; bh=cf9nNPWLtAUIH7GNDCvLLhesx3+Auda8Zmc/2Vk2hWw=; h=From:To:Subject:Date:From; b=rYDvhgaPwwe4LopT96D1TusYrbmLAzi3bEkabOpYlKWTs4o47FwtlSD39fjHSKFQH duzCmvldYWYiyy8H3wVbDgAVEKRb7Q2/5ClJUjqUAOhoMHegICEurJZ+Lgx2Qzt6v7 SkWg5skHhjZFryo0q7IFxCVJQqlwpVqZpbblEKuM= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109319] New: [13 Regression] ICE in build_min_non_dep_op_overload, at cp/tree.cc:3793 Date: Tue, 28 Mar 2023 18:53:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109319 Bug ID: 109319 Summary: [13 Regression] ICE in build_min_non_dep_op_overload, at cp/tree.cc:3793 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Started between 20221106 and 20221120, with -std=3Dc++23 : (follow-up of pr108437) $ cat z1.cc struct S { static int operator[] (int x) { int a[2]; return a[x]; } }; template int f () { S s; ++s[0,1]; return 0; } $ cat z2.cc struct S { static int operator[] (int x) { int a[2]; return a[x]; } }; template int f () { S s; ++s[1,0]; return 0; } $ g++-13-20230326 -c z1.cc -std=3Dc++23 z1.cc: In function 'int f()': z1.cc:8:6: warning: top-level comma expression in array subscript changed meaning in C++23 [-Wcomma-subscript] 8 | ++s[0,1]; | ^ z1.cc:8:10: internal compiler error: in build_min_non_dep_op_overload, at cp/tree.cc:3793 8 | ++s[0,1]; | ^ 0x8de226 build_min_non_dep_op_overload(tree_node*, tree_node*, tree_node*, vec*) ../../gcc/cp/tree.cc:3793 0x7ad99d grok_array_decl(unsigned int, tree_node*, tree_node*, vec**, int) ../../gcc/cp/decl2.cc:569 0x843ca4 cp_parser_postfix_open_square_expression ../../gcc/cp/parser.cc:8223 0x856671 cp_parser_postfix_expression ../../gcc/cp/parser.cc:7814 0x86a60f cp_parser_unary_expression ../../gcc/cp/parser.cc:9141 0x83e79f cp_parser_cast_expression ../../gcc/cp/parser.cc:10045 0x86a707 cp_parser_unary_expression ../../gcc/cp/parser.cc:9055 0x83e79f cp_parser_cast_expression ../../gcc/cp/parser.cc:10045 0x83f07f cp_parser_binary_expression ../../gcc/cp/parser.cc:10147 0x83fa74 cp_parser_assignment_expression ../../gcc/cp/parser.cc:10490 0x8411b2 cp_parser_expression ../../gcc/cp/parser.cc:10660 0x844837 cp_parser_expression_statement ../../gcc/cp/parser.cc:12816 0x851cbc cp_parser_statement ../../gcc/cp/parser.cc:12596 0x852d54 cp_parser_statement_seq_opt ../../gcc/cp/parser.cc:12967 0x852e0f cp_parser_compound_statement ../../gcc/cp/parser.cc:12919 0x873958 cp_parser_function_body ../../gcc/cp/parser.cc:25335 0x873958 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.cc:25386 0x873e16 cp_parser_function_definition_after_declarator ../../gcc/cp/parser.cc:32012 0x874f90 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.cc:31929 0x874f90 cp_parser_init_declarator ../../gcc/cp/parser.cc:22789=