From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1ABA33858D28; Tue, 20 Sep 2022 10:08:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1ABA33858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663668536; bh=yJkpv1S5FqK6l6VE+AZ9Y2FePEhmM+vDtvlZw2Vrnfk=; h=From:To:Subject:Date:From; b=AkzzBPr1WdotuVR7wYsvmhsjQMMlUnYcTZ2bksD/0WM/BpKVC8nniJshrqQC+hE2H HlnOpwOTQQC9f6FQhhcU8Ca2Wp0fSYjz9LFYIKlIkoEN7BwQd3nq3rYo6C2Xowbkf3 opGAOI6g/lh0i0lzeU/cx2JDr+HD8GAa9BaAgfEY= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106976] New: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in override_type_for_decl_p, at dwarf2out.cc:24345 Date: Tue, 20 Sep 2022 10:08:43 +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.2.1 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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 keywords 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=3D106976 Bug ID: 106976 Summary: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in override_type_for_decl_p, at dwarf2out.cc:24345 Product: gcc Version: 12.2.1 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- For this invalid code: struct S{ constexpr static auto s =3D requires { []; }; }; Without -g we get an unhelpful error: $ g++-11 -std=3Dc++20 -g -c ice.C ice.C:2:25: error: storage size of 'S::s' isn't known 2 | constexpr static auto s =3D requires { []; }; | ^ But it ICEs with -g ice.C:1:8: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in override_type_for_decl_p, at dwarf2out.cc:243= 45 1 | struct S{ | ^ 0x88a36b tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /home/jwakely/src/gcc/gcc/gcc/tree.cc:8877 0x79a909 tree_class_check(tree_node*, tree_code_class, char const*, int, ch= ar const*) /home/jwakely/src/gcc/gcc/gcc/tree.h:3643 0x79a909 override_type_for_decl_p /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:24345 0x79a909 gen_variable_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:24608 0xd92df8 gen_decl_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27085 0xd9544c gen_member_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:25844 0xd9544c gen_struct_or_union_type_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:25930 0xd9544c gen_tagged_type_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26131 0xd96660 gen_tagged_type_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26085 0xd96660 gen_type_die_with_usage /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26326 0xd931bb gen_type_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:26381 0xd931bb gen_decl_die /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27020 0xd9436b dwarf2out_decl /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27575 0xd94668 dwarf2out_type_decl /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27293 0xd94668 dwarf2out_type_decl /home/jwakely/src/gcc/gcc/gcc/dwarf2out.cc:27288 0x10bc934 rest_of_type_compilation(tree_node*, int) /home/jwakely/src/gcc/gcc/gcc/passes.cc:339 0x997d17 finish_struct_1(tree_node*) /home/jwakely/src/gcc/gcc/gcc/cp/class.cc:7638 0x998cef finish_struct(tree_node*, tree_node*) /home/jwakely/src/gcc/gcc/gcc/cp/class.cc:7785 0xaeb608 cp_parser_class_specifier /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:26120 0xaeda95 cp_parser_type_specifier /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:19488 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions.=