[LLVMbugs] [Bug 16744] Clang optimized out a branch function with Os option

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 29 18:52:49 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16744

Eli Friedman <sharparrow1 at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |sharparrow1 at yahoo.com
         Resolution|---                         |INVALID

--- Comment #1 from Eli Friedman <sharparrow1 at yahoo.com> ---
clang is behaving correctly here.  Assuming no undefined behavior,
pxMutex->uxRecursiveCallCount must point at the same object before and after
the decrement, so it can't be null.  Therefore, xQueueGenericSend can never be
called.

If you want clang to not optimize this sort of construct, you can pass -fwrapv.

-- 
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/20130730/95782f44/attachment.html>


More information about the llvm-bugs mailing list