From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5D1D3858D1E; Fri, 11 Feb 2022 00:49:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5D1D3858D1E From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/104492] [12 Regression] Bogus dangling pointer warning at -O3 Date: Fri, 11 Feb 2022 00:49:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor 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: bug_status component short_desc everconfirmed blocked cf_reconfirmed_on keywords 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 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: Fri, 11 Feb 2022 00:49:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104492 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|c++ |middle-end Summary|Bogus dangling pointer |[12 Regression] Bogus |warning (dangling pointer |dangling pointer warning at |to =E2=80=98candidates=E2=80=99 may be used |-O3 |[-Werror=3Ddangling-pointer=3D] | |) | Ever confirmed|0 |1 Blocks| |104077 Last reconfirmed| |2022-02-11 Keywords| |diagnostic CC| |msebor at gcc dot gnu.org --- Comment #2 from Martin Sebor --- The warning is issued for the if condition in the basic block below: [local count: 1014686340]: # _106 =3D PHI <&MEM [(void *)&candidates + 16B](26), &candidates(27)> : _274 =3D _106; __pred =3D{v} {CLOBBER(eol)}; _17 =3D _274; __pred =3D{v} {CLOBBER(eol)}; candidates =3D{v} {CLOBBER(eol)};=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 <<< clobber s =3D{v} {CLOBBER(eol)}; D.169975 =3D{v} {CLOBBER(eol)}; if (&MEM [(void *)&candidates + 16B] !=3D _= 17)=20=20 <<< -Wdangling-pointer goto ; [5.50%] else goto ; [94.50%] Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104077 [Bug 104077] bogus/missing -Wdangling-pointer=