[Bug tree-optimization/107066] Field initialized before ctor is mis-optimized away by DSE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107066 --- Comment #3 from Feng Xue --- Got it. Thanks for that.
[Bug tree-optimization/107066] Field initialized before ctor is mis-optimized away by DSE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107066 --- Comment #2 from Andrew Pinski --- See https://gcc.gnu.org/gcc-6/porting_to.html#flifetime-dse also. Which documented when the change happened back in GCC 6.
[Bug tree-optimization/107066] Field initialized before ctor is mis-optimized away by DSE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107066 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski --- You need -fno-lifetime-dse as documented https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Optimize-Options.html#index-flifetime-dse C++ is defined this way otherwise.