From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D019E398AC2F; Tue, 30 Aug 2022 08:27:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D019E398AC2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661848029; bh=njJ3G2Sj8hCcDpZu4L5TC4p1zysTR4kdm+oIVRP5x/8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DznfctxVAePJt/65dZo5BBuDbmYYIlSmGMNJJBhRy3TKuQlEuQ/chGjHXgAcZX6EV 3gcokVhLIkTQzmwPBYDcmUDz0y87KRtYIs+bO9u4QaAWtWpoW7ylD4by9TXcrMnfQ6 qlAmp9KHdCwiQtO5O7sv4d2wIF3dCHmNxFVWwOQI= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/65244] Bogus -Wmaybe-uninitialized warning with posix_memalign() and -Og Date: Tue, 30 Aug 2022 08:27:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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 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=3D65244 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #16 from Richard Biener --- To trigger the diagnostic in GCC 12+ you also need -fno-thread-jumps. The issue with this testcase is that we have [local count: 1073741824]: # ptr_2 =3D PHI if (_1 !=3D 0) goto ; [0.04%] else goto ; [99.96%] [local count: 429496]: exit (1); [local count: 1073312329]: return ptr_2; and predicate::init_from_control_deps does /* Skip if there is essentially one succesor. */ if (EDGE_COUNT (e->src->succs) =3D=3D 2) { edge e1; edge_iterator ei1; bool skip =3D false; FOR_EACH_EDGE (e1, ei1, e->src->succs) { if (EDGE_COUNT (e1->dest->succs) =3D=3D 0) { skip =3D true; break; } } if (skip) continue; } which causes us to ignore the _1 !=3D 0 predicate on the use. I'm not sure what's the reason on this - we have put a limit on the number of edges in the chain and the number of chains, so this can't be to remain within such limit. Simply skipping some predicates can also make the defined domain larger which is against the intent of the pass. Testing removal of this premature optimization(?).=