From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 55FF3385734A; Fri, 9 Sep 2022 13:18:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 55FF3385734A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662729512; bh=xKOwCHR+znhep/742E+rhMheiV+mWQ0KLm9YweF8QP4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OGH88KMCEzjzg/S+vg4Wq+s68GwwJjIF5S8IvmqRx8hQnWXRs3jQeh8XlCtMOwj2E K1rFJa23P6fhl8uja5t6u3Gs2T0xG5HXS4nbdvAdt/6QGrP2IvyLXfT4hkEEf3oDV9 8wRXhgZJQ0FS94J47FCqdY3ZZQj/NbO7YnUAjItM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106833] Miss to handle OPAQUE_TYPE specially in verify_type Date: Fri, 09 Sep 2022 13:18:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-checking X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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=3D106833 --- Comment #13 from CVS Commits --- The master branch has been updated by Kewen Lin : https://gcc.gnu.org/g:e230f11e9784eefed316df7dbc5df6ac999841b2 commit r13-2562-ge230f11e9784eefed316df7dbc5df6ac999841b2 Author: Kewen Lin Date: Fri Sep 9 08:17:21 2022 -0500 Handle OPAQUE_TYPE specially in verify_type [PR106833] As PR106833 shows, cv-qualified opaque type can cause ICE during LTO. It exposes that we missd to handle OPAQUE_TYPE well in type verification. As Richi pointed out, also assuming that target will always define TYPE_MAIN_VARIANT TYPE_CANONICAL for opaque type, this patch is to check both are OPAQUE_TYPE_P and their modes are of MODE_OPAQUE class. Besides, it also checks the only available size and alignment information. PR middle-end/106833 gcc/ChangeLog: * tree.cc (verify_opaque_type): New function. (verify_type): Call verify_opaque_type for OPAQUE_TYPE. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr106833.c: New test.=