From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 54DC53858294; Sat, 17 Sep 2022 15:08:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54DC53858294 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663427294; bh=UJCkRpvjHuoWZMlVGEMpOM1hvA1tyWaX29BQVr1e9dY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OTqKXfL4oZLiMZw6qAXWP72fGPm1HA2uMgc/A4UA45Shg1OUa/peWFVLbSj+QiB52 Qbojdij8JDCCFpLje+Q7mgsAB1T7QlCSIg+3teWHYo30jkxpLdYB6CCIrRHTNbmDeE TzoZ4oEkZRA0KWNMQUWqBusEDUUs15vZGOzNsppQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106960] [12/13 Regression] Incorrect optimization of signed integer comparisons Date: Sat, 17 Sep 2022 15:08:14 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status 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=3D106960 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski --- Signed integer overflow is undefined behavior. That is -INT_MIN is undefined behavior. You need to either use -fwrapv or change the code to use unsigned types to = get defined behavior.=