From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 761E53858421; Wed, 13 Sep 2023 07:28:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 761E53858421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694590092; bh=B5LVan2W+XrJjy4bm3j2jFFBYwE3litxyELnKZmJQ7A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=b7HincQOCVRVJr19wjLQjplbV/GffRipIR3q6EAToKt31VO8+KKIlAE4wRbrkItSI BNzF0gcHrLTtIQiydIYSM2RVDvAEaWCPXjICmlGS/Gx842aX43/n6hClj/lNNkgi9j bPl4gv7pCSgbQNH4vEXU0XvF5rq7x2k2C4grH6UU= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111397] Spurious warning "'({anonymous})' is used uninitialized" when calling a __returns_twice__ function (-Wuninitialized -O2) Date: Wed, 13 Sep 2023 07:28:11 +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: 13.2.0 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: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to cf_reconfirmed_on bug_status everconfirmed 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=3D111397 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org Last reconfirmed| |2023-09-13 Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 --- Comment #2 from Richard Biener --- (In reply to Andrew Pinski from comment #1) > Looks loop copy header change which allowed the warning not to happen. >=20 > The warning is about the argument of test_setjmpex. Because GCC does not > realize __builtin_frame_address cannot jump to the test_setjmpex ... >=20 > In the case of GCC 12-13, the copy of the loop header happens during > thread-full rather than earlier and inserts: > _4(ab) =3D _11(D); >=20 > Which is what is warned about. > _11(D) does not get proped into the phi ... We can't propagate because /* Similarly if DEST flows in from an abnormal edge then the copy cannot = be propagated. If we know we do not propagate into a PHI argument this does not apply. */ else if (!dest_not_phi_arg_p && TREE_CODE (dest) =3D=3D SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (dest)) return false; that's still not fine-grained enough - the case we cannot propagate is when we propagate into a PHI argument for an abnormal edge. The diagnostic doesn't happen on trunk, I still have a patch doing the propagation.=