From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E59423893640; Wed, 29 Apr 2020 17:40:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E59423893640 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588182009; bh=obVtslTjSqi29hywnO4r5iCLjT1InNX94VKzzY3zBVk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WZFhagGRkFyHP7/oIJHWy6Ar+PLeBnP6xY7NW3XSG+LqHnS4XsoCuJ3LSDHEIkHeB ICbYroFRxfDxqrVDy92Np9CeqxD5jFOkAiiuvPklA1+o5E3PIyT4F/nVy1onPVKf1C mjrBS7qYegtD1D2TkwEisj0lbsY9b5nm/JZT/Vg8= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94775] [8/9/10 Regression] ICE in strip_typedefs, at cp/tree.c:1734 since r8-4668-g8a5ee94a082b3d48 Date: Wed, 29 Apr 2020 17:40:09 +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: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 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: Wed, 29 Apr 2020 17:40:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94775 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #8 from Jakub Jelinek --- (In reply to Marek Polacek from comment #7) > So a fix could be this, but maybe it would make us create a lot more > variants (?): >=20 > --- a/gcc/tree.c > +++ b/gcc/tree.c > @@ -6493,7 +6493,8 @@ check_base_type (const_tree cand, const_tree base) > TYPE_ATTRIBUTES (base))) > return false; > /* Check alignment. */ > - if (TYPE_ALIGN (cand) =3D=3D TYPE_ALIGN (base)) > + if (TYPE_ALIGN (cand) =3D=3D TYPE_ALIGN (base) > + && TYPE_USER_ALIGN (cand) =3D=3D TYPE_USER_ALIGN (base)) > return true; > /* Atomic types increase minimal alignment. We must to do so as well > or we get duplicated canonical types. See PR88686. */ > @@ -6528,6 +6529,7 @@ check_aligned_type (const_tree cand, const_tree bas= e, > unsigned int align) > && TYPE_CONTEXT (cand) =3D=3D TYPE_CONTEXT (base) > /* Check alignment. */ > && TYPE_ALIGN (cand) =3D=3D align > + && TYPE_USER_ALIGN (cand) =3D=3D TYPE_USER_ALIGN (base) > && attribute_list_equal (TYPE_ATTRIBUTES (cand), > TYPE_ATTRIBUTES (base)) > && check_lang_type (cand, base)); It looks like the right thing to me. I guess if we really wanted, we could instrument the compiler to see how common this was (though best in a separa= te build from just the above patch), i.e. when we would create a new type only with this patch and not without.=