[Bug c++/95638] Legit-looking code doesn't work with -O2
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 11 12:23:05 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95638
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> The code works with -flifetime-dse=1, so I bet there's some object that goes
> out of life:
> https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
> https://gcc.gnu.org/gcc-6/porting_to.html#flifetime-dse
The difference between -flifetime-dse=1 and the default is not in uses after
end of scope, but in relying on content being defined across start of the
constructor.
More information about the Gcc-bugs
mailing list