[Bug c++/108808] New: G++ -O2 incorrectly bypasses an infinite loop

2023-02-15 Thread zhihan.yue at foxmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108808 Bug ID: 108808 Summary: G++ -O2 incorrectly bypasses an infinite loop Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c++/108808] G++ -O2 incorrectly bypasses an infinite loop

2023-02-15 Thread zhihan.yue at foxmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108808 --- Comment #3 from Zhihan Yue --- (In reply to Andrew Pinski from comment #1) > >This shows that the infinite loop was skipped. > > > Correct. There is a requirement in the C++17 standard that requires forward > process and therefor infinite