From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 97E4A3858403; Wed, 15 Dec 2021 19:14:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97E4A3858403 From: "pinskia 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, 15 Dec 2021 19:14:02 +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: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: msebor at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2021 19:14:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D40635 --- Comment #19 from Andrew Pinski --- (In reply to Martin Sebor from comment #18) > The location is still present at g:45f4e2b01b82c72b3a11ff4ad184d7edcf0e63= d4 > but is lost after: >=20 > commit 9f55df63154a39d67ef5b24def7044bf87300831 > Author: Andrew Pinski > Date: Tue Jun 1 01:05:09 2021 +0000 >=20 > Replace conditional_replacement with match and simplify >=20=20=20=20=20 > This is the first of series of patches to simplify phi-opt > to use match and simplify in many cases. This simplification > will more things to optimize. Yes this part is the missing part: - /* Set the locus to the first argument, unless is doesn't have one. = */ - locus_0 =3D gimple_phi_arg_location (phi, 0); - locus_1 =3D gimple_phi_arg_location (phi, 1); - if (locus_0 =3D=3D UNKNOWN_LOCATION) - locus_0 =3D locus_1; - gimple_set_location (new_stmt, locus_0); Let me look over the weekend.=