From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C44E9385841D; Mon, 3 Jul 2023 21:04:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C44E9385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688418284; bh=/Ptmx90coPSpHhWnhZutUuCEczoX3XBgUUwtznu835U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GibwFEJkat00LUXmNT9mduHH3jBi56AyOm0gtGPUnZDhs0b+/sPy68+y2rv7gumRH ImT1oGZFZZbevIfgLPQ6bmQINryac39/A4HYXtgeYHQa5MmCG8Pix+IuhW/g6rnFPT p34QtrKA0DccvHziaNECUsPwDhwY5OiC6gmkkdeQ= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110228] [13/14 Regression] llvm-16 miscompiled due to an maybe uninitialized variable Date: Mon, 03 Jul 2023 21:04:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox 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: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D110228 Sergei Trofimovich changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #24 from Sergei Trofimovich --- Trying to understand the failure mode here: In bug.c.033t.early_objsz I still see the explicit stores to LocalFlags: : LookupFlags_15 =3D 0; goto ; [INV] : if (v_13 =3D=3D 1) goto ; [INV] else goto ; [INV] : LookupFlags_14 =3D 1; : # LookupFlags_4 =3D PHI *p_16(D) =3D LookupFlags_4; But in bug.c.034t.ccp1 I see no stores at all: if (v_13 =3D=3D 0) goto ; [INV] else goto ; [INV] : if (v_13 =3D=3D 1) goto ; [INV] else goto ; [INV] : : # LookupFlags_4 =3D PHI <0(3), LookupFlags_5(4), 1(5)> Specifically '# LookupFlags_4 =3D PHI <0(3), LookupFlags_5(4), 1(5)>' claim= s that somehow gets values '0' and '1' into a PHI node. AFAIU PHI is an equivalent of a mutable variable in an otherwise immutable = SSA form. It has to be a write it needed value is not there yet. Why the store = of '1' was removed? Is it because variable 'v_13' already happens to have 0 or= 1 value? I wonder why PHI does not look like something below: # LookupFlags_4 =3D PHI =