[LLVMbugs] [Bug 16602] incorrect loop optimization at O2
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jul 11 15:23:46 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16602
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
CC| |richard-llvm at metafoo.co.uk
Resolution|--- |INVALID
--- Comment #3 from Richard Smith <richard-llvm at metafoo.co.uk> ---
(In reply to comment #2)
> I can use global variables in this way if I don't care about race
> conditions.
False. Your code has a data race, and so has undefined behavior.
> The condition can be missed few times in the loop but eventually
> x will become 29 and the loop must exit.
False. The store to 'x' in 'set_x' is not guaranteed to ever become visible to
'main'.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130711/719d8d25/attachment.html>
More information about the llvm-bugs
mailing list