From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22A3A3858422; Thu, 22 Sep 2022 20:02:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22A3A3858422 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663876920; bh=5FZYO3UHvAC9V5k4eL/mK9kzxsEE95e5XdGWZIQYKdI=; h=From:To:Subject:Date:From; b=mAV2vZYE5Y7byUBLvyzKJw5g4QloPOg6hRK9bXG2lGN4850XusNbuc1zVHFFH4wXt upAIvxgmLezXywBTYYq3yyRJVyIK5nc0iZ94J+3FFt38BdQUm1E6sbo7P+VaDoPzu7 /4f0H4JK0HXdO0HpIdWToGeqmNOiCVl0afGcvZu0= From: "hiraditya at msn dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107011] New: instruction with undefined behavior not optimized away Date: Thu, 22 Sep 2022 20:01:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hiraditya at msn dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107011 Bug ID: 107011 Summary: instruction with undefined behavior not optimized away Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: hiraditya at msn dot com Target Milestone: --- #include int main() { return INT_MIN / -1; } $ gcc -O3 main: mov eax, -2147483648 ret $ clang -O3 main: # @main ret https://godbolt.org/z/393EMqs1E PS: I reported this bug yesterday as well but for some reason it does not appear in bugzilla so I'm creating another one.=