https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61982 --- Comment #3 from Avi Kivity <avi@cloudius-systems.com> --- I observed this with non-trivial destructors as well. In fact, something like: X::~X() { i = 3; } also emits a store.