From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3CD2B3858402; Tue, 2 Nov 2021 10:31:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3CD2B3858402 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/103040] gdc.dg/torture/pr101273.d FAILs Date: Tue, 02 Nov 2021 10:31:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot org X-Bugzilla-Target-Milestone: 12.0 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: Tue, 02 Nov 2021 10:31:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103040 --- Comment #4 from Jakub Jelinek --- Yeah, I've tried that through: struct S { S () : x (0) { impl =3D this; } int x; S *impl; ~S () {} }; S foo () { S ret; return ret; } S bar () { return S (); } int main () { S a =3D foo (); S b =3D bar (); if (a.impl !=3D &a || b.impl !=3D &b) __builtin_abort (); } but for C++ we don't miscompile that, though indeed starting with the above mentioned commit at -O1 ealias info changes: -ESCAPED =3D &a -ESCAPED =3D &b -ESCAPED =3D { ESCAPED NONLOCAL a b } +ESCAPED =3D { } -a =3D { ESCAPED NONLOCAL a } same as _1 -b =3D { ESCAPED NONLOCAL b } same as _2 +a =3D { NONLOCAL a } same as _1 +b =3D { NONLOCAL b } same as _2 -_1 =3D { ESCAPED NONLOCAL a } -_2 =3D { ESCAPED NONLOCAL b } +_1 =3D { NONLOCAL a } +_2 =3D { NONLOCAL b } -ESCAPED, points-to non-local, points-to vars: { D.2419 D.2421 } (escaped) +ESCAPED, points-to vars: { } -_1, points-to non-local, points-to escaped, points-to NULL, points-to vars= : { D.2419 } (escaped) -_2, points-to non-local, points-to escaped, points-to NULL, points-to vars= : { D.2421 } (escaped) +_1, points-to non-local, points-to NULL, points-to vars: { D.2419 } +_2, points-to non-local, points-to NULL, points-to vars: { D.2421 }=