From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 12A3E3858404; Thu, 16 May 2024 14:27:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12A3E3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715869673; bh=2QZU3r/wuQfDyjbNH1im+R/yM+hYXAE/XJkwt+9Alho=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ox2/bYT2YfwShQwS2LcsDQCzDWXVB3PMzf0fZ/UIRgPT9t0o6BD6mj13AX8kA2WbY lzXtxDQMxuXU2QEwnpwnvNvhexfQRBUc0wBJAv5S6BZM9idBJ4ORtOd8SptFpSlCb5 k1Z8WrMlzhmVcIixaqqVRRu4gYtwINkfo4kz/U4g= From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/96564] [11/12/13/14/15 Regression] New maybe use of uninitialized variable warning since r11-959 Date: Thu, 16 May 2024 14:27:52 +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: aldyh 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: 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 --- Comment #19 from Aldy Hernandez --- (In reply to Richard Biener from comment #17) > Handling pointer-vs-pointer in ptrs_compare_unequal isn't enough since we > have >=20 > # PT =3D nonlocal null > unsigned int * x_7(D) =3D x; > ... > # PT =3D null { D.2785 } > a_9 =3D malloc (_2); > if (a_9 =3D=3D 0B)=20 > goto ; [0.04%] > else > goto ; [99.96%] >=20 > [local count: 429496]: > goto ; [100.00%] >=20 > [local count: 1073312328]: > if (x_7(D) !=3D a_9) >=20 > so querying points-to only has to consider both pointers being NULL. Now, > I'm not sure how prange handles the above and whether or how it integrates > knowledge from flow-insensitive points-to analysis. prange currently does nothing different than what irange did. It's a first step in providing points-to and propagating the information through the CFG like we do for integer ranges. Or more precisely, prange is meant to be nothing more than a pair of integer end points (not unlimited like int_range_max), plus a value/mask pair. >=20 > Aldy might know. >=20 > I'm testing a patch enhancing ptrs_compare_unequal right now, also filling > in a missing bit in points-to info.=