From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F0B043858C20; Fri, 15 Jul 2022 00:05:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F0B043858C20 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106311] New: internal compiler error in redeclare_class_template Date: Fri, 15 Jul 2022 00:05:28 +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: mpolacek at gcc dot gnu.org 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: Fri, 15 Jul 2022 00:05:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106311 Bug ID: 106311 Summary: internal compiler error in redeclare_class_template Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- Found while reducing bug 106309. template struct array; template struct array { }; $ ./cc1plus -quiet p.C p.C:2:21: error: =E2=80=98size_t=E2=80=99 has not been declared 2 | template struct array { }; | ^~~~~~ p.C:1:21: error: template parameter =E2=80=98long int =E2=80=99 1 | template struct array; | ^~~~ p.C:2:38: internal compiler error: tree check: expected tree that contains =E2=80=98decl minimal=E2=80=99 structure, have =E2=80=98error_mark=E2=80=99= in redeclare_class_template, at cp/pt.cc:6380 2 | template struct array { }; | ^~~~~ 0x1bcc50c tree_contains_struct_check_failed(tree_node const*, tree_node_structure_enum, char const*, int, char const*) /home/mpolacek/src/gcc/gcc/tree.cc:8991 0xb06dc6 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) /home/mpolacek/src/gcc/gcc/tree.h:3622 0xe136e1 redeclare_class_template(tree_node*, tree_node*, tree_node*) /home/mpolacek/src/gcc/gcc/cp/pt.cc:6380 0xc40a20 xref_tag(tag_types, tree_node*, TAG_how, bool) /home/mpolacek/src/gcc/gcc/cp/decl.cc:15869 0xdaafdd cp_parser_class_head /home/mpolacek/src/gcc/gcc/cp/parser.cc:26785=