From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EC4C33858C55; Tue, 20 Sep 2022 18:38:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC4C33858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663699125; bh=Gg7LaFW5DXZzsfZbL1KPbkbHNV1NNJP6xhkPAYbknhY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RI7cvy+7R/bKjOoV3iIugpE4bnGvqwE9oVaZiOdmU5yvenKpQBvIthwXMqyYH0mts 5ZEaLfSbKGEymu9uH689PxS/DMkfNnUHVBvcAI7eerpTCug4QpIYeB6l/xrWqOJhLm 3ZsMaP8gXFJ5r91P7OC2pe2SA9Ot+I6x4+KzX6es= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106983] [12/13 Regression] ICE tree check: expected class 'type', have 'exceptional' (error_mark) in type_build_dtor_call, at cp/class.cc:5794 Date: Tue, 20 Sep 2022 18:38:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: error-recovery, ice-on-invalid-code X-Bugzilla-Severity: trivial X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status Message-ID: In-Reply-To: References: 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=3D106983 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot= gnu.org Status|NEW |ASSIGNED --- Comment #2 from Marek Polacek --- I think just --- a/gcc/cp/typeck2.cc +++ b/gcc/cp/typeck2.cc @@ -597,7 +597,7 @@ split_nonconstant_init_1 (tree dest, tree init, bool la= st, if (prev =3D=3D field_index) break; tree ptype =3D TREE_TYPE (prev); - if (type_build_dtor_call (ptype)) + if (TYPE_P (ptype) && type_build_dtor_call (ptype)) { tree pcref =3D build3 (COMPONENT_REF, ptype, dest, prev, NULL_TREE); should be enough to fix this.=