From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C1DF43854839; Mon, 19 Oct 2020 07:28:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1DF43854839 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97468] gcc crashes when using __may_alias__ attribute Date: Mon, 19 Oct 2020 07:28:02 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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 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: Mon, 19 Oct 2020 07:28:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97468 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code --- Comment #2 from Richard Biener --- #1 0x00000000016e9d82 in layout_type ( type=3D) at /home/rguenther/src/gcc2/gcc/stor-layout.c:2618 but of course calling layout_type from type_hash_canon is quite fishy as we'll end up layouting a template_type_parm here ... now, feeding this to type_hash_canon is fishy as well so the FE should probably not call any of the attribute handlers on those ... tree type_hash_canon (unsigned int hashcode, tree type) { type_hash in; type_hash **loc; /* The hash table only contains main variants, so ensure that's what we're being passed. */ gcc_assert (TYPE_MAIN_VARIANT (type) =3D=3D type); /* The TYPE_ALIGN field of a type is set by layout_type(), so we must call that routine before comparing TYPE_ALIGNs. */ layout_type (type);=