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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 6 07:51:31 PST 2015


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

            Bug ID: 22822
           Summary: Aggressive optimization breaks the code and removes
                    checks
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: curdeius at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13993
  --> http://llvm.org/bugs/attachment.cgi?id=13993&action=edit
Minimal example of the code causing the problem

The attached code is miscompiled at optimization levels -Os and above and the
checks in checked_add function are apparently ignored.
Reproduced on FreeBSD and Windows with clang 3.5.0 (release=r217039) and
3.6.0(tags/RELEASE_360/final).

-- 
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/991a5e99/attachment.html>


More information about the llvm-bugs mailing list