From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 85F043858282; Sun, 7 Apr 2024 22:39:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85F043858282 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712529578; bh=rbUcQJQRtRYmuMo3R+kH/bjZ0qxmwKJqojsWF4DA48U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QMhnM/pPxMYZOm6Se5g8lbuNISnOBk8awOVVIfEdNlBja4pwIMNCHMnu7iO269E91 JZOU1626Exht2SrGu9j9X0yQDLAk85T1IRMhLmG/8lTWS2E1VU9CZuYqykbZILRtsX 4oNKxAo0eVNp3lcm9JTDUZi9WSOfWXF+EkEeX/Jk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114631] Inconsistent behavior with infinite loops? Date: Sun, 07 Apr 2024 22:39:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.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: DUPLICATE 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=3D114631 --- Comment #4 from Andrew Pinski --- (In reply to Ganton from comment #3) > When that page (https://bugreports.qt.io/browse/QTBUG-33026) was written, > the behavior of GCC was not like the described in this bug report (because > the `for (doub =3D [...]` infinite loop was always taken into account). D= o we > have a regression? =F0=9F=A4=94 No, the removal of loops which cannot prove being finite was added in GCC 10 (which was released in 2020) while the issue you pointed to was written up = in 2013 which was GCC 4.8.x timeframe. In this case C++ standard has not chang= ed, just GCC started to optimize more based on what the standard says is allowe= d.=