https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108808

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>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 loops can be removed.


"The implementation may assume that any thread will eventually do one of
the following:
  — terminate,
  — make a call to a library I/O function,
  — perform an access through a volatile glvalue, or
  — perform a synchronization operation or an atomic operation.
[Note: This is intended to allow compiler transformations such as
removal of empty loops, even when termination cannot be proven. — end note]"

Reply via email to