[Bug c++/84471] Instruction reordering happens in lambdas even with -O0

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 20 11:59:00 GMT 2018


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-20
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jan Engelhardt from comment #0)
> Expected behavior:
> 
> Objects built with -O0 ought not cause gdb to spuriously "go backwards" in
> source (for reasons other than the end of a loop).

(Or when running a non-trivial destructor of a local variable.)

The observed behaviour does seem odd.


More information about the Gcc-bugs mailing list