[LLVMbugs] [Bug 12967] New: Assertion `shiftAmt <= BitWidth && "Invalid shift amount"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun May 27 12:55:53 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12967
Bug #: 12967
Summary: Assertion `shiftAmt <= BitWidth && "Invalid shift
amount"' failed.
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: chenyang at cs.utah.edu, llvmbugs at cs.uiuc.edu
Classification: Unclassified
[regehr at dyson r60]$ clang -v
clang version 3.2 (trunk 157521)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at dyson r60]$ clang -c -w -O small.c
clang:
/uusoc/exports/scratch/regehr/z/compiler-build/llvm-r157521/include/llvm/ADT/APInt.h:732:
llvm::APInt llvm::APInt::shl(unsigned int) const: Assertion `shiftAmt <=
BitWidth && "Invalid shift amount"' failed.
0 clang 0x0000000001b9552f
1 clang 0x0000000001b95a44
2 libpthread.so.0 0x00007f18c796a8f0
3 libc.so.6 0x00007f18c6c59a75 gsignal + 53
4 libc.so.6 0x00007f18c6c5d5c0 abort + 384
5 libc.so.6 0x00007f18c6c52941 __assert_fail + 241
6 clang 0x00000000007f5d5c
7 clang 0x0000000001908a6c
8 clang 0x000000000190871d
9 clang 0x0000000001906ed6
10 clang 0x0000000001906d4a
11 clang 0x00000000019093b3
12 clang 0x00000000018c8737
13 clang 0x00000000018c8fff
14 clang 0x0000000001b3499b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 443
15 clang 0x0000000001964d75
16 clang 0x0000000001b34e73
llvm::MPPassManager::runOnModule(llvm::Module&) + 419
17 clang 0x0000000001b353f8 llvm::PassManagerImpl::run(llvm::Module&)
+ 408
18 clang 0x0000000001b3555a llvm::PassManager::run(llvm::Module&) +
10
19 clang 0x0000000000773a70
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 4976
20 clang 0x000000000077193a
21 clang 0x000000000089a055 clang::ParseAST(clang::Sema&, bool, bool)
+ 389
22 clang 0x0000000000770acb clang::CodeGenAction::ExecuteAction() +
459
23 clang 0x0000000000641edd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
24 clang 0x000000000062b14b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3307
25 clang 0x000000000061fe6b cc1_main(char const**, char const**, char
const*, void*) + 731
26 clang 0x0000000000627878 main + 3464
27 libc.so.6 0x00007f18c6c44c4d __libc_start_main + 253
28 clang 0x000000000061fac9
Stack dump:
0. Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r157521-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -coverage-file small.o -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r157521-install/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r157521-install/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-w -fdebug-compilation-dir /home/regehr/z/reduce/r60 -ferror-limit 19
-fmessage-length 90 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option
-fcolor-diagnostics -o small.o -x c small.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'small.c'.
4. Running pass 'Combine redundant instructions' on function '@fn4'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang version 3.2 (trunk 157521)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/small-7SfJPR.i
clang: note: diagnostic msg: /tmp/small-7SfJPR.sh
[regehr at dyson r60]$ cat small.c
int a, b, c, d, e, f;
char
fn1 (p1)
{
return 1 >> p1;
}
void fn2 ();
void fn3 ();
void
fn4 ()
{
c = d == 0;
fn2 (c);
}
void
fn2 (p1)
{
fn3 (p1);
}
void
fn3 (p1)
{
char g;
e = p1 & 8;
f = e - 1;
if (a)
{
g = 0 <= b;
b = g;
}
else
b = fn1 (f);
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list