From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EE3093858D32; Mon, 5 Sep 2022 08:09:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE3093858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662365348; bh=iXMqkzdt8Gj4TJbt2eOpayXU1FolTmtyddSvgbMOlyw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vfYdn0NUhCYK+jSR0e9BeDUp7kDS6RMWepGP+Nl9TMu49FxpnldVeqkAdwrQiycxs 0j5QKsag9Bw/plCim+JW7CQsC47ZsSP2Y+fCrUwM1jrnsYzWFmcZO0hQzuzSijL7fF X7gMnh+qobk0zEowFyL6izwAYOHBwJXIa7YQ8Tr8= From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106833] Handle OPAQUE_TYPE in gimple_canonical_types_compatible_p Date: Mon, 05 Sep 2022 08:09:08 +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: linkw 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: keywords cc cf_gcctarget 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 Kewen Lin changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-checking CC| |bergner at gcc dot gnu.org, | |hubicka at gcc dot gnu.org, | |rguenth at gcc dot gnu.org, | |segher at gcc dot gnu.org Target| |powerpc*-linux-gnu --- Comment #1 from Kewen Lin --- IMHO this is an omission when we were adding supports for opaque type, const __vector_quad and __vector_quad should be taken as canonical_types_compatib= le. I wonder if we can simply take it just like what it handles for "Non-aggreg= ate types", for example: diff --git a/gcc/tree.cc b/gcc/tree.cc index 2f488e4467c..555e96c59d5 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -13510,6 +13510,7 @@ gimple_canonical_types_compatible_p (const_tree t1, const_tree t2, || TREE_CODE (t1) =3D=3D VECTOR_TYPE || TREE_CODE (t1) =3D=3D COMPLEX_TYPE || TREE_CODE (t1) =3D=3D OFFSET_TYPE + || TREE_CODE (t1) =3D=3D OPAQUE_TYPE || POINTER_TYPE_P (t1)) { /* Can't be the same type if they have different recision. */ Or adding one default hook which does the similar thing, and then if one ta= rget needs some target specific checks on its opaque type, one specific hook can= be provided.=