[Bug c++/80649] value-initialization rather than default-initialization at some optimization levels

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat May 6 21:25:00 GMT 2017


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

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

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Your example has undefined behaviour, you can't assume that a value present
before a constructor is still present afterwards.

See "More aggressive optimization of -flifetime-dse" at
https://gcc.gnu.org/gcc-6/porting_to.html


More information about the Gcc-bugs mailing list