From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 668B63858295; Thu, 30 Nov 2023 12:35:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 668B63858295 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701347720; bh=FCELTCRDNAuIwvRRr6Yy2vuD41php+0IjZtxv3bHpYM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lHlGg1yvwhodi3GbA6vlbAfHjWAJGCFOBHHSzLJxolBEdM2EZAM1foaG2C6dy8bUw 8bvWyYGW8KibJgx5JvX//YoME0NrhQ50MsYkZtYmm7/uIxUAVr6Uac7hZFwVvZKUVH qeK9+dzrrKDxO1Oo6OP0gQhSFs+HcLYTIO/qPgyk= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112766] [14 regression] spurious -Wmaybe-uninitialized with array new since r14-4089 Date: Thu, 30 Nov 2023 12:35:19 +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: 14.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D112766 --- Comment #4 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:8a6062a47b33da6d961c6354fd5788bc46aef0a9 commit r14-6009-g8a6062a47b33da6d961c6354fd5788bc46aef0a9 Author: Richard Biener Date: Thu Nov 30 10:58:13 2023 +0100 tree-optimization/112766 - improve pruning of uninit diagnostics Uninit diagnostics has code to prune based on incoming PHI args that prove the uninit code is never executed. But that only looks at the first found flag candidate while in the PRs case only the second candidate would be the one to prune on. The following patch makes us consider all of the flag candidates which is cycles well spent IMHO. PR tree-optimization/112766 * gimple-predicate-analysis.cc (find_var_cmp_const): Support continuing the iteration and report every candidate. (uninit_analysis::overlap): Iterate over all flag var candidates. * g++.dg/torture/uninit-pr112766.C: New testcase.=