[Bug c++/71885] Incorrect code generated with -01, memset() function call is missing

hyc at symas dot com gcc-bugzilla@gcc.gnu.org
Sun Aug 14 11:12:00 GMT 2016


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

--- Comment #15 from hyc at symas dot com ---
(In reply to Markus Trippelsdorf from comment #3)
> See https://gcc.gnu.org/gcc-6/porting_to.html (More aggressive optimization
> of -flifetime-dse).
> 
> You're invoking undefined behavior; -flifetime-dse=1 is a workaround.

"More aggressive optimization of -flifetime-dse

The C++ compiler (with enabled -flifetime-dse) is more aggressive in dead-store
elimination in situations where a memory store to a location precedes a
constructor to the memory location."

This bug report is talking about a store that occurs *during* the constructor.
This does not *precede* the constructor.


More information about the Gcc-bugs mailing list