From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA11A38432EC; Thu, 24 Nov 2022 10:20:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA11A38432EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669285208; bh=OLk2imEbZlDk7FtXh6apK7Rdg/2t+Jl7TXlzgUl7aVs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Tt/NrmZ3zjcmZ8UZbMtiOu++dtrf3bP/+aQJtk1TKLTG+kJ3GNmiqWjaDWEH1dTaH hLP2Fmt8FV841ClTx5X7u1FpPfg0G+hgNEcvNdQAvWXJeE/uymRzVzYFQKenwBL0er 0an3dAB+BGaPtcM9Ns+vWXlaoRzA/+kx7fQoToW8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107838] spurious "may be used uninitialized" warning on variable initialized at the first iteration of a loop Date: Thu, 24 Nov 2022 10:20:08 +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.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: 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=3D107838 --- Comment #2 from Richard Biener --- I think there's a duplicate bug, we fail to pick up the controlling conditi= on because IVOPTs replaced the exit test but we still have i_19 =3D (int) ivtmp.4_6; if (i_19 =3D=3D 0) ... [local count: 966367643]: ivtmp.4_21 =3D ivtmp.4_6 + 1; if (ivtmp.4_21 !=3D 9) thus with -fno-ivopts the predication code works fine. It doesn't try hard enough to consider "derived" conditions like the above.=