[Bug c++/114631] New: Inconsistent behavior with infinite loops?

2024-04-07 Thread kubry at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114631 Bug ID: 114631 Summary: Inconsistent behavior with infinite loops? Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c++/114631] Inconsistent behavior with infinite loops?

2024-04-07 Thread kubry at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114631 --- Comment #3 from Ganton --- Note: That code was initially aimed for `decimal32` testing (https://bugreports.qt.io/browse/QTBUG-33026) because using `decimal32` instead of `double`... the `for (doub = [...]` loop is not infinite. When that

[Bug c++/114631] Inconsistent behavior with infinite loops?

2024-04-08 Thread kubry at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114631 --- Comment #5 from Ganton --- Thanks for the detailed information, Andrew! If anybody reads this bug report: The reported problems are seen using GCC 13.2.0 and `-O2`, but not using `-O1` nor `-O0`.

[Bug middle-end/93041] GCC 10 removes an infinite loop and causes a null pointer to dereferenced

2024-04-08 Thread kubry at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93041 --- Comment #11 from Ganton --- A related assigned task is: [C++26] P2809R3 - Trivial infinite loops are not undefined behavior https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114462

[Bug c++/114631] Inconsistent behavior with infinite loops?

2024-04-07 Thread kubry at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114631 --- Comment #1 from Ganton --- Maybe this can be useful: "if we remove the `std::cout << doub << " ";` line... the program stops"... does that happen because an "aggressive"(?樂) optimization is made (without warning the user)? If we add a