[LLVMbugs] [Bug 22822] Aggressive optimization breaks the code and removes checks

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 6 08:11:49 PST 2015


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

David Blaikie <dblaikie at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dblaikie at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from David Blaikie <dblaikie at gmail.com> ---
Looks like undefined behavior to me.

signed integer overflow (as happens at the beginning of the call to checked_add
when passed max_int) is undefined. Since your program unconditionally executes
that addition, the behavior of the entire program is undefined - nothing it
does, even before the point of the addition, is guaranteed by the C++ standard.

-- 
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/20150306/b8ac3971/attachment.html>


More information about the llvm-bugs mailing list