[Bug tree-optimization/52558] write introduction incorrect wrt the C++11 memory model
francesco.zappa.nardelli at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 13 07:30:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52558
--- Comment #11 from Francesco Zappa Nardelli <francesco.zappa.nardelli at gmail dot com> 2012-03-13 07:29:51 UTC ---
Just one remark: in this case the write introduction is incorrect wrt the C++11
memory model because there are no previous write to the same location. If
there had been a previous write to the same location, then the discriminating
context would have been racy and the code generated by -O2 sound.
I believe that the above argument generalises to all write introductions but I
don't yet have a proof of this, so take it with a pinch of salt.
More information about the Gcc-bugs
mailing list