This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/52558] write introduction incorrect wrt the C++11 memory model
- From: "francesco.zappa.nardelli at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Mar 2012 07:29:51 +0000
- Subject: [Bug tree-optimization/52558] write introduction incorrect wrt the C++11 memory model
- Auto-submitted: auto-generated
- References: <bug-52558-4@http.gcc.gnu.org/bugzilla/>
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.