From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 291FF3858C54; Tue, 22 Nov 2022 10:08:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 291FF3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669111683; bh=GFDXZ1HDcaULXXScRFJf5h6/nE4SYW15alMPzbVIwV4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XTxYfrWgWI4mNiRdTfR4OG1mE36pCpvQhuuBwaTKoOr0hlBtrK6tdq01cjKxOZnQL IxwLIXGn0TYVj/hoplbcuKrMI9nnHiCoE2/cD/+r4+zlSRro3KgilTueT6GtXYhqfs uMuK65j2hVjR+KoDV4IHMIWs4C7KJzaiUeNc1k14= From: "vincent-gcc at vinc17 dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/80548] -Wmaybe-uninitialized false positive when an assignment is added Date: Tue, 22 Nov 2022 10:07:54 +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: 6.3.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: vincent-gcc at vinc17 dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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=3D80548 --- Comment #10 from Vincent Lef=C3=A8vre -= -- (In reply to Jeffrey A. Law from comment #9) > These warnings are certainly sensitive to all kinds of things, so it's > possible it's just gone latent. The only way to be sure would be to bise= ct > all the work between gcc-12 and the trunk and pour over the dumps with a > fine tooth comb. I would hazard a guess it was Aldy's backwards threader > work, particularly around not bailing out too early for subpaths based on > comments in the BZ, but one would have to bisect to be 100% sure. The commit that made the warning disappear is actually the one fixing PR106= 754. commit 0a4a2667dc115ca73b552fcabf8570620dfbe55f Author: Richard Biener Date: 2022-09-06 13:46:00 +0200 tree-optimization/106754 - fix compute_control_dep_chain defect The following handles the situation of a loop exit along the control path to the PHI def or from there to the use in a different way, aoviding premature abort of the walks as noticed in the two cases where the exit is outermost (gcc.dg/uninit-pred-11.c) or wrapped in a condition that is on the path (gcc.dg/uninit-pred-12.c). Instead of handling such exits during recursion we now pick them up in the parent when walking post-dominators. That requires an additional post-dominator walk at the outermost level which is facilitated by splitting out the walk to a helper function and the existing wrapper added earlier. The patch also removes the bogus early exit from uninit_analysis::init_use_preds, fixing a simplified version of the PR106155 testcase.=