[llvm-bugs] [Bug 32282] New: Assertion `loBit <= BitWidth && "loBit out of range"' failed with -O0 -march=skx.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 15 10:26:49 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32282

            Bug ID: 32282
           Summary: Assertion `loBit <= BitWidth && "loBit out of range"'
                    failed with -O0 -march=skx.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: Vsevolod.Livinskij at frtk.ru
                CC: llvm-bugs at lists.llvm.org

Created attachment 18096
  --> https://bugs.llvm.org/attachment.cgi?id=18096&action=edit
Reproducer.

Clang++ fails with assertion with -O0 -march=skx.

Reproducer:
extern bool b;
extern const bool c;
extern long int d;
extern long int e;

void foo() {
  bool a = 0 / (7 + (~(-3013716102214263007L | d) >>
           ((e ^ b) << (1 | 551409148 | c) - 551409131) -
           223084523 & ~0 + 9223372036854775807));
}

Error:
llvm-trunk/include/llvm/ADT/APInt.h:1181: void llvm::APInt::setBits(unsigned
int, unsigned int): Assertion `loBit <= BitWidth && "loBit out of range"'
failed.

LLVM version:
clang version 5.0.0 (trunk 297835)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vsevolod/workspace/llvm/bin-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

-- 
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/20170315/07405625/attachment.html>


More information about the llvm-bugs mailing list