From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F08413858C1F; Thu, 15 Jun 2023 04:50:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F08413858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686804640; bh=Hq9qZQM6xNA1pn0cjNg1Uz28gE5S9rlZLTOuGkMDSgI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YvUcssNOkvMw0HY5jjgghGvUoQZ2VX2DInZkLuCJOq3hIKfZphdt6WU9VXd7HA8jP rqNxtXytGNCo0MSLsEhStlfcnr3N8/ywd8nXNp5/pinW60aexsB4NhD8S/ICJrqcoJ fG7d/1zxxrxGw2xr53sq7v7aJJ6dlfkJlj/Uqfo4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110228] [14 Regression] llvm-16 miscompiled due to an maybe uninitialized and optimizations saying that the uninitialized has a nonzero bits of 1. Date: Thu, 15 Jun 2023 04:50:39 +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: pinskia 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: 14.0 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=3D110228 --- Comment #9 from Andrew Pinski --- That is these exports: 2->3 (T) c.5_7 : [irange] int [1334323000, +INF] NONZERO 0x7fffffff 2->3 (T) _8 : [irange] long unsigned int [1334323000, 2147483647] NONZERO 0x7fffffff 2->3 (T) b.6_9 : [irange] int [1334323000, +INF] NONZERO 0x7fffffff 2->3 (T) _10 : [irange] long unsigned int [1334323000, 2147483647] NONZERO 0x7fffffff 2->3 (T) _11 : [irange] long unsigned int [3481806647, 3481806649] NONZERO 0xcf88273f 2->3 (T) _12 : [irange] long unsigned int [0, 2] NONZERO 0x3 seems wrong. We originally had: c.5_7 =3D c; _8 =3D (long unsigned int) c.5_7; b.6_9 =3D b; _10 =3D (long unsigned int) b.6_9; _11 =3D _8 + _10; _12 =3D _11 + 18446744070227744969; if (_12 <=3D 2) so _11 export seems correct but _8 and _10 added together needs to be make = _11. Since it is unsigned, the whole range for both numbers can make _11's range; that is we can't say anything about _8 or _10. Even if _11 is signed, I don= 't see how _8 and _10 could be described at all ... since _8 could be 0 and _10 could be 3481806647 and the range that is exported for _8 does not even inc= lude 0. Unless I am missing something obvious here.=