From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 436183858D37; Mon, 5 Jun 2023 23:09:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 436183858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686006587; bh=p5q4TZm7a+DOQ8ljUpeYGi+/Vigmb/mZdSrwi58holE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vh6tnGdvvqvEZOhayJG7qgw9OngVPFqYNM+lzxAthAMYPV7mVYro2tHH1vfwE97oc Z3174tdlyRH1FocAIttdv2EuN4osSo9Ra7hDDaKldUVzCRYSxplR0Z5UMv8qoGvZ0V qihDVTkY41xPyPkmcZQQDli7taS0WhWvcvzplzVM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110129] Possible wrong-code on -O2 and above (affecting versions from GCC-10.1 onward) Date: Mon, 05 Jun 2023 23:09:47 +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: 14.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: 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=3D110129 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > >Did I miss anything here? Thanks! >=20 > Yes clang is incorrect in removing the infinite loop. >=20 > See bug 94392 comment #3 The loop around via goto is not removable in C11 based on that comment so I= am not 100% sure if clang is doing the correct thing but GCC is valid doing the valid thing of not removing it (it is valid to keep the infinite loops in).=