From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 36B2F3852C43; Wed, 23 Nov 2022 15:07:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36B2F3852C43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669216044; bh=7RYnn2pz5uFIju1jqIHdnHcaL3D9x/8F1e4T/5IlQ3c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Iy3I70MRfbcGTzDisFMlXxaCYkteU8UCWguT27iz5c1i4t+3lZ2vS40/riiuHWUkt OY7hzeyuOnZiL2hJ3b+NBvS7tIYz/szAoDqfaCmwIyibROAIGIblKPBHGO+u2z8fw4 ZcgcycvulS+wP3K9rvz7H93Eoh4Upjq8H1KJU5EU= From: "aldyh 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 15:07:23 +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: aldyh 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 #4 from Aldy Hernandez --- (In reply to Martin Li=C5=A1ka from comment #3) > > Isn't there an uninitialized read from "i" here? >=20 > Yes ... >=20 > > 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. >=20 > ... but as you correctly said, it's never executed as 'a < h' is always > false. Huh... me thinking 1 < 0 is true is a clear sign I need to go on vacation. /me hides in shame=