From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 156233893640; Wed, 29 Apr 2020 17:31:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 156233893640 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588181491; bh=T1qB+jI4gRIYhb0YXFR9J3U51g8xbrX8xmEbOntHX8k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hpjF73z3C41xg8Fo2Gxzz73/lh3xcIrq6A9ZdLdDqusbdI1dspRLGJ8yaeEk2sr4w fp3e+5aeiityRnDJW9V4bzCeYAb3dwtRp5+tmAoDcqRgd92lIWwyw6L7OtQavddny6 NmnGWPB1HrK2pDXCJt1EsTTkWq+iyOccv+4cp774= From: "mpolacek 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:31:30 +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: mpolacek 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: 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:31:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94775 --- Comment #7 from Marek Polacek --- So a fix could be this, but maybe it would make us create a lot more varian= ts (?): --- 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 base, 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));=