From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 190223858D28; Mon, 8 May 2023 17:21:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 190223858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683566472; bh=mbIttZ2lYx4m0YHctApZmr7rnBfZXAcEMhs0pfnkfjM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Jng1g6uEQxhJAHuGKNFh7yJdkZ0Bvrr0npYUG+GoFOV9Ba310iirud2Kenb9NW6LT 9XIcaqoLuIH3waoIzJBuBpbjMPyw9kvZAE32WDP/7c18/49vh7iFT0N4PrAH5GkJw1 /Uhcm0i3pKR+hrbinO+SwDv9lr2AmXDJ+OJtb41w= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/109770] [10/11/12/13/14 Regression] wrong(?) devirtualization Date: Mon, 08 May 2023 17:21:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 10.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109770 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #5 from Richard Biener --- So we devirtualize during FRE1: Determining dynamic type for call: OBJ_TYPE_REF(_3;(struct Base)_7->1B) (_7= ); Starting walk at: _1 =3D MEM[(struct Base *)_7]._vptr.Base; instance pointer: _7 Outer instance pointer: _7 offset: 0 (bits) vtbl reference: MEM[(struct Base *)_7]._vptr.Base Checking constructor call: B::B (_7); Recording type: struct B at offset 0 Determined dynamic type. so eventually the CTOR call handling needs to be removed if we cannot rely on that producing a specific dynamically typed object. Any C++ experts?=