This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52558] write introduction incorrect wrt the C++11 memory model
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Mar 2012 15:01:36 +0000
- Subject: [Bug c++/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 #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-12 15:01:36 UTC ---
(In reply to comment #1)
> Richi, is this something that should also be fixed for 4.7 as well? There is a
> write to g_2 that is introduced on paths that did not have it. So this is not
> just a load/load data race.
No, we don't want to fix this for 4.7 as this is not a regression.
Yes, LIM only avoids introducing traps, not data-races. This was discussed
in the past already, btw, and we do not want to generally disallow this
optimization. [The C++ memory model is stupid here, it should not treat
every variable raceable but only specially marked ones, oh well ...]
There will be very many other passes that are affected by this, and even more
very many passes that will be affected by load data-races.
You will for example slow down SPEC CPU 2006 quite a bit (though technically
it does not include C++11 benchmarks).