From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3ED743858C50; Tue, 25 Oct 2022 17:34:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3ED743858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666719256; bh=lZ9O2aF2kBeltDljrQK2T6Xw4Ozsrl7spD8rfnlWe2c=; h=From:To:Subject:Date:From; b=lJjWiUAQIE3TJJTvNNcDoEC2Su7q1/8G0kLlDS73KHcPO24epar5hitcOKRjZhB6I SHsS0ew6ByeVyuQRQESe9Nluhh1whDXprj4CpxF2KOJzc6Hbx2OQbuYcGfeb7ePXX/ uy6aMXNthcfnhJaZKiIEs8H6KDzRMfZUrCoGh99A= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107401] New: ICE in get_originating_module_decl, at cp/module.cc:18587 Date: Tue, 25 Oct 2022 17:34:15 +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=3D107401 Bug ID: 107401 Summary: ICE in get_originating_module_decl, at cp/module.cc:18587 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: --- With file g++.dg/parse/pr81247-a.C and pr81247-b.C : $ g++-13-20221023 -c pr81247-a.C -fmodules-ts pr81247-a.C:5:1: error: expected '{' before 'template' 5 | template < typename T > class A | ^~~~~~~~ ' pr81247-a.C: In instantiation of 'class A': pr81247-a.C:12:13: required from here Segmentation fault 6 | { // { dg-error "redeclared as different" } | ^ 0x11d299f crash_signal ../../gcc/toplev.cc:314 0x98b3c7 tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) ../../gcc/tree.h:3648 0x98b3c7 get_originating_module_decl(tree_node*) ../../gcc/cp/module.cc:18587 0x98b687 get_originating_module(tree_node*, bool) ../../gcc/cp/module.cc:18626 0x919fa6 dump_module_suffix ../../gcc/cp/error.cc:207 0x91acba dump_module_suffix ../../gcc/cp/error.cc:189 0x91acba dump_aggr_type ../../gcc/cp/error.cc:856 0x9294f6 decl_to_string ../../gcc/cp/error.cc:3297 0x9294f6 cp_printer ../../gcc/cp/error.cc:4471 0x22113c0 pp_format(pretty_printer*, text_info*) ../../gcc/pretty-print.cc:1475 0x21f02f0 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info= *) ../../gcc/diagnostic.cc:1548 0x21f0a3a diagnostic_impl ../../gcc/diagnostic.cc:1712 0x21f1286 error(char const*, ...) ../../gcc/diagnostic.cc:2008 0x8d8196 duplicate_decls(tree_node*, tree_node*, bool, bool) ../../gcc/cp/decl.cc:1814 0x9cd5a3 pushdecl(tree_node*, bool) ../../gcc/cp/name-lookup.cc:3686 0x9d0012 do_pushdecl_with_scope ../../gcc/cp/name-lookup.cc:4769 0x9d022e pushdecl_namespace_level(tree_node*, bool) ../../gcc/cp/name-lookup.cc:6126 0xabb63a tsubst_friend_class ../../gcc/cp/pt.cc:11589 0xabb63a instantiate_class_template(tree_node*) ../../gcc/cp/pt.cc:12320 0xb2b3e6 complete_type(tree_node*) ../../gcc/cp/typeck.cc:138=