From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 323753858D20; Sun, 7 Apr 2024 22:26:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 323753858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712528794; bh=GC9O7wu1ZU/kpbGg1rvF4FVQoZMgYfuxB/6JvZzQdVk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IEShREYy8mUwb+Igl9s9UOWQBG4GISV+gCz5sefitL1T4ibBbUQHeBsUyuMQSZFsV 7y+aRrnjD5WCa3NfpSsqRSP8Z5Re6jEXbCwpkYdtiS1B2xJ2Rsri1ujZ6riJLGCCYp k7P1gRMlKQQoXWcKkqLt+K+BcIqvB1HalRzqIJhk= From: "kubry at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114631] Inconsistent behavior with infinite loops? Date: Sun, 07 Apr 2024 22:26:32 +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: kubry at gmx 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: 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 #1 from Ganton --- Maybe this can be useful: "if we remove the `std::cout << doub << " ";` lin= e... the program stops"... does that happen because an "aggressive"(?=F0=9F=A4= =94) optimization is made (without warning the user)?=20 If we add a `for(;;);` after the `double doub;` line, then the program never stops. If an "aggressive"(?=F0=9F=A4=94) optimization is made, why is made = for one loop but not for the other loop? Is that inconsistent?=