From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C452D3853D5D; Wed, 23 Nov 2022 14:17:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C452D3853D5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669213069; bh=pGAif0Q99VV3B9bEAgCC3CUeTI7WwiQHFvgFEhGQ4yw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ou4wFoUvWKFYDN7riCM/AvrlZ7OSbflXEKjFnOEoC6ENjX/IHoHegLpfIrHoAk1oq 6Z5ynOzKwehkavCrXcvRknD33D6UQPBNIdXuDcBhj55zAIGXfADt79ZzjX7rd+8dLx CwU6P9xNzjhJ3lKqiUqm8l9uwrGa0wqlTQuMtYRc= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107833] wrong code at -Os and above on x86_64-linux-gnu since r12-5138-ge82c382971664d6f Date: Wed, 23 Nov 2022 14:17:49 +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: 12.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D107833 --- Comment #3 from Martin Li=C5=A1ka --- > Isn't there an uninitialized read from "i" here? Yes ... > At least on the second > time through the outer loop, if (a < h) is true since 1 < 0. >=20 > > c =3D *f; > > } > > for (h =3D 0; h < 3; h++) { > > if (d) > > break; >=20 > d is nonzero so h will always be 0 in this function. ... but as you correctly said, it's never executed as 'a < h' is always fal= se. >=20 > > i--; > > printf("0"); > > } > > } > > return 0; > > } >=20 > Unless I'm missing something....=