From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 11F073858281; Sun, 10 Mar 2024 22:49:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11F073858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710110949; bh=VmVDj+sisn0ICGKEgzJhb6wmfjcbdcbattLREl8y1FY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nL+WcguFgZQYIEkw7yqy35nU9ksWflbeCGQ+nhhLvwNjvN2yoZIkqkF+oDRgL5jUM JySZ4MLzk1smsV3u78UIKL/cWUgl/4uLyZPZAQDjhFG3nxhyk61OPOlKbgGUCkC4ul pQU6Nhrey2H2wRSuBDdYAj7Dj1wVcbGbZXCQTYQQ= From: "law at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/96564] [11/12/13/14 Regression] New maybe use of uninitialized variable warning since r11-959 Date: Sun, 10 Mar 2024 22:49:07 +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: 11.0 X-Bugzilla-Keywords: alias, diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: law at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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=3D96564 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org, | |rguenth at gcc dot gnu.org --- Comment #12 from Jeffrey A. Law --- So I think we could solve this with a bit of help from the alias oracle. We have the routine ptrs_compare_unequal, but points-to-null is going to get = in the way. I think VRP and DOM have enough information to rule out NULL for both objec= ts in question. So if we could query the points-to information, ignoring NULL then we could likely solve this particular bug. Essentially VRP or DOM would prove NULL isn't in the set of possible values= at the comparison point. Then we query the alias information ignoring NULL.=20 Voila we compute a static result for the comparison of the two pointers and= the problematical block becomes unreachable and the bogus warning goes away. Richi, any thoughts in viability of such an API?=