From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8DFC0385B235; Mon, 11 Apr 2022 16:53:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DFC0385B235 From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105228] New: [9/10/11/12 Regression] ICE tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in decl_anon_ns_mem_p, at cp/tree.cc:3826 Date: Mon, 11 Apr 2022 16:53:12 +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: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2022 16:53:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105228 Bug ID: 105228 Summary: [9/10/11/12 Regression] ICE tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in decl_anon_ns_mem_p, at cp/tree.cc:3826 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Started with r7 : (gcc configured with --enable-checking=3Dyes) $ cat z1.cc template class> struct A { template static void foo() { foo(); } }; $ g++-12-20220410 -c z1.cc z1.cc:1:19: error: 'void' is not a valid type for a template non-type param= eter 1 | template class> struct A | ^~~~ z1.cc: In substitution of 'template > class > template static void A< >::foo() [with Args =3D ; =3D {}]': z1.cc:4:26: required from here z1.cc:4:15: internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'error_mark' in decl_anon_ns_mem_p, at cp/tree.cc:3826 4 | static void foo() { foo(); } | ^~~ 0x6c9ab3 tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.cc:8953 0xa1b4ac contains_struct_check(tree_node const*, tree_node_structure_enum, = char const*, int, char const*) ../../gcc/tree.h:3827 0xa1b4ac decl_anon_ns_mem_p(tree_node const*) ../../gcc/cp/tree.cc:3826 0x8182b7 determine_visibility(tree_node*) ../../gcc/cp/decl2.cc:2867 0x9ae8bf tsubst_function_decl ../../gcc/cp/pt.cc:14305 0x9924f3 tsubst_decl ../../gcc/cp/pt.cc:14585 0x97ad67 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.cc:15565 0x9b4cb2 instantiate_template_1 ../../gcc/cp/pt.cc:21625 0x9b4cb2 instantiate_template(tree_node*, tree_node*, int) ../../gcc/cp/pt.cc:21684 0x9bc656 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bo= ol, bool) ../../gcc/cp/pt.cc:22150 0x72543b add_template_candidate_real ../../gcc/cp/call.cc:3544 0x7265a1 add_template_candidate ../../gcc/cp/call.cc:3636 0x7265a1 add_candidates ../../gcc/cp/call.cc:6176 0x736240 add_candidates ../../gcc/cp/call.cc:10994 0x736240 build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../gcc/cp/call.cc:11038 0x9e7dde finish_call_expr(tree_node*, vec**, b= ool, bool, int) ../../gcc/cp/semantics.cc:2791 0x9189d8 cp_parser_postfix_expression ../../gcc/cp/parser.cc:7880 0x92ffb1 cp_parser_unary_expression ../../gcc/cp/parser.cc:9029 0x8fd91f cp_parser_cast_expression ../../gcc/cp/parser.cc:9933 0x8fe1e1 cp_parser_binary_expression ../../gcc/cp/parser.cc:10035=