[Bug middle-end/31862] Loop IM and other optimizations harmful for -fopenmp
bonzini at gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 25 12:18:00 GMT 2009
------- Comment #16 from bonzini at gnu dot org 2009-02-25 12:18 -------
The upcoming C++0x memory model forbids this; see
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2338.html (Concurrency
memory model compiler consequences). But it says that this is acceptable
instead:
tmp = var;
modified = false;
for (i = 0; i < 100; i++)
{
if (i > x)
tmp = i, modified = true;
}
if (modified)
var = tmp;
I think the bug can be confirmed, can't it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31862
More information about the Gcc-bugs
mailing list