From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE0F53858288; Fri, 26 May 2023 19:59:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE0F53858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685131172; bh=XvVUb3vI+t4zwocKK4le0/2wZgfrr6Rt6RX4sMwrxlE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Rf032K4aePJalsP3RJBmP2nq5u1aP2vyT8ypqhcfw3RUdLOvhN/VeV1HN8thfBNMt 7BNA/jmg/Q4DAfXx83pXOw/lHWM3Zrw9kUo3Woab90SLZgesNMnd6Ot9ID4WA68uln w/8RKQi4rKV0Q2yu09lfdy/Qp+S3q1+innbxXiQY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109991] stack-use-after-scope Date: Fri, 26 May 2023 19:59:32 +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: 14.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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: 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=3D109991 --- Comment #4 from Andrew Pinski --- (In reply to igk from comment #3) > (In reply to Andrew Pinski from comment #2) > > Dup of bug 98675. > >=20 > > *** This bug has been marked as a duplicate of bug 98675 *** >=20 > Thanks for looking into this. I haven't quite understood though.=20 Let me reword of what is going on and why it is still is a dup. So the constexpr should be ignored because it is undefined code. But since GCC does not detect the undefineness yet (this is what PR 98675 is about), GCC decid= es that it is still a constexpr and evaluates it at compile time and removes t= he ability for the sanitizer to detect the undefinedness at runtime.=