[LLVMbugs] [Bug 13228] New: lib/Analysis/ScalarEvolution.cpp:5310 (SolveLinEquationWithOverflow) : Assertion `A != 0 && "A must be non-zero."' failed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jun 28 08:39:00 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13228
Bug #: 13228
Summary: lib/Analysis/ScalarEvolution.cpp:5310
(SolveLinEquationWithOverflow) : Assertion `A != 0 &&
"A must be non-zero."' failed
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: merkil at savhon.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
At -O1 and higher, LLVM/Clang version 3.2 (trunk 159346) fails to compile the
following testcase :
$ cat file.c
void f(void)
{
char a, b, i;
int c = 1;
for(i = 0; !i; i++)
{
c = 0;
if(a *= 1)
b = 0;
}
while(a++)
if(!(b += c))
return;
}
$ clang -w -O1 file.c
clang: /home/merkil/git/clang/llvm/lib/Analysis/ScalarEvolution.cpp:5310: const
llvm::SCEV *SolveLinEquationWithOverflow(const llvm::APInt &, const llvm::APInt
&, llvm::ScalarEvolution &): Assertion `A != 0 && "A must be non-zero."'
failed.
0 clang 0x0000000001beb1bf
1 clang 0x0000000001beb684
2 libpthread.so.0 0x000000344d410970
3 libc.so.6 0x000000344d037c15 gsignal + 53
4 libc.so.6 0x000000344d038f27 abort + 327
5 libc.so.6 0x000000344d030d22
6 libc.so.6 0x000000344d030dd2
7 clang 0x0000000001a4ae77
llvm::ScalarEvolution::HowFarToZero(llvm::SCEV const*, llvm::Loop const*) +
1463
8 clang 0x0000000001a46910
llvm::ScalarEvolution::ComputeExitLimitFromICmp(llvm::Loop const*,
llvm::ICmpInst*, llvm::BasicBlock*, llvm::BasicBlock*) + 1184
9 clang 0x0000000001a45fb7
llvm::ScalarEvolution::ComputeExitLimitFromCond(llvm::Loop const*,
llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*) + 407
10 clang 0x0000000001a45d96
llvm::ScalarEvolution::ComputeExitLimit(llvm::Loop const*, llvm::BasicBlock*) +
502
11 clang 0x0000000001a44cca
llvm::ScalarEvolution::ComputeBackedgeTakenCount(llvm::Loop const*) + 234
12 clang 0x0000000001a44332
llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop const*) + 290
13 clang 0x0000000001a44ad9
llvm::ScalarEvolution::getBackedgeTakenCount(llvm::Loop const*) + 9
14 clang 0x00000000018581f9
15 clang 0x00000000019e8769
llvm::LPPassManager::runOnFunction(llvm::Function&) + 841
16 clang 0x0000000001b9174b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 443
17 clang 0x0000000001986af5
18 clang 0x0000000001b91c23
llvm::MPPassManager::runOnModule(llvm::Module&) + 419
19 clang 0x0000000001b921a8 llvm::PassManagerImpl::run(llvm::Module&)
+ 408
20 clang 0x0000000001b9230a llvm::PassManager::run(llvm::Module&) +
10
21 clang 0x00000000007917b0
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5056
22 clang 0x000000000078f5fa
23 clang 0x00000000008be0b4 clang::ParseAST(clang::Sema&, bool, bool)
+ 516
24 clang 0x000000000078e658 clang::CodeGenAction::ExecuteAction() +
184
25 clang 0x00000000006701e5 clang::FrontendAction::Execute() + 101
26 clang 0x0000000000652dbd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
27 clang 0x000000000063aae4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3316
28 clang 0x000000000062f71b cc1_main(char const**, char const**, char
const*, void*) + 731
29 clang 0x0000000000637016 main + 3542
30 libc.so.6 0x000000344d024695 __libc_start_main + 245
31 clang 0x000000000062f35d
Stack dump:
0. Program arguments: /home/merkil/git/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
file.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.22 -momit-leaf-frame-pointer -resource-dir
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil -ferror-limit 19 -fmessage-length 169
-mstackrealign -fobjc-runtime=gnu-fragile -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/file-iY6bx0.o -x c file.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'file.c'.
4. Running pass 'Loop Pass Manager' on function '@f'
5. Running pass 'Induction Variable Simplification' on basic block
'%while.cond'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 159346)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
--
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