From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A3B183882060; Wed, 12 Jun 2024 12:33:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3B183882060 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718195636; bh=ieT7jVj7c7PYswZKEVD/0sLpoN5tXALirQPUwPL2+dk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VeoyjOZuiR+YALGTkezml/vW96hMVBog0NuNISwc4fWm1PTJ24DacO07A1tKKjy8q hi4mDbBiYbzqZpSdJ3tDo9HSP228pFrPL4GXd6FACflafk3xSjGOg9ViTMwbflbavV G1+WHAvnDoLbGXc4Sjwb5nrMt95cz4izKZE//vdc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/40635] [12 Regression] bogus name and location in 'may be used uninitialized' warning Date: Wed, 12 Jun 2024 12:33:52 +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.4.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 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=3D40635 --- Comment #29 from GCC Commits --- The releases/gcc-12 branch has been updated by Richard Biener : https://gcc.gnu.org/g:844ff32c04a4e36bf69f3878634d9f50aec3a332 commit r12-10553-g844ff32c04a4e36bf69f3878634d9f50aec3a332 Author: Richard Biener Date: Mon Dec 5 16:03:21 2022 +0100 middle-end/40635 - SSA update losing PHI arg loations The following fixes an issue where SSA update loses PHI argument locations when updating PHI nodes it didn't create as part of the SSA update. For the case where the reaching def is the same as the current argument opt to do nothing and for the case where the PHI argument already has a location keep that (that's an indication the PHI node wasn't created as part of the update SSA process). PR middle-end/40635 * tree-into-ssa.cc (rewrite_update_phi_arguments): Only update the argument when the reaching definition is different from the current argument. Keep an existing argument location. * gcc.dg/uninit-pr40635.c: New testcase. (cherry picked from commit 0d14720f93a8139a7f234b2762c361e8e5da99cc)=