[LLVMbugs] [Bug 9633] New: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Apr 5 20:35:24 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9633
Summary: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' 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: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu
[regehr at gamow tmp010]$ clang -c -w -O2 small.c
clang:
/uusoc/exports/scratch/regehr/z/compiler-build/llvm-r128982/include/llvm/Support/Casting.h:202:
typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::SCEVAddRecExpr, Y = const llvm::SCEV*]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.
0 clang 0x000000000189895f
1 clang 0x000000000189abd2
2 libpthread.so.0 0x00007f03b2029190
3 libc.so.6 0x00007f03b132e4b5 gsignal + 53
4 libc.so.6 0x00007f03b1331f50 abort + 384
5 libc.so.6 0x00007f03b1327481 __assert_fail + 241
6 clang 0x00000000015709d2
7 clang 0x00000000016fa70c
llvm::ScalarEvolution::computeSCEVAtScope(llvm::SCEV const*, llvm::Loop const*)
+ 412
8 clang 0x00000000016fb414
llvm::ScalarEvolution::getSCEVAtScope(llvm::SCEV const*, llvm::Loop const*) +
644
9 clang 0x00000000016fa993
llvm::ScalarEvolution::computeSCEVAtScope(llvm::SCEV const*, llvm::Loop const*)
+ 1059
10 clang 0x00000000016fb414
llvm::ScalarEvolution::getSCEVAtScope(llvm::SCEV const*, llvm::Loop const*) +
644
11 clang 0x00000000016fa993
llvm::ScalarEvolution::computeSCEVAtScope(llvm::SCEV const*, llvm::Loop const*)
+ 1059
12 clang 0x00000000016fb414
llvm::ScalarEvolution::getSCEVAtScope(llvm::SCEV const*, llvm::Loop const*) +
644
13 clang 0x00000000016e9bc1
llvm::ScalarEvolution::ComputeBackedgeTakenCountFromExitCondICmp(llvm::Loop
const*, llvm::ICmpInst*, llvm::BasicBlock*, llvm::BasicBlock*) + 321
14 clang 0x00000000016ea2e4
llvm::ScalarEvolution::ComputeBackedgeTakenCountFromExitCond(llvm::Loop const*,
llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*) + 500
15 clang 0x00000000016ea811
llvm::ScalarEvolution::ComputeBackedgeTakenCountFromExit(llvm::Loop const*,
llvm::BasicBlock*) + 657
16 clang 0x00000000016eab54
llvm::ScalarEvolution::ComputeBackedgeTakenCount(llvm::Loop const*) + 740
17 clang 0x00000000016eaf14
llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop const*) + 260
18 clang 0x00000000016eb419
llvm::ScalarEvolution::getMaxBackedgeTakenCount(llvm::Loop const*) + 9
19 clang 0x00000000016f1910
llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type const*)
+ 1168
20 clang 0x00000000016f715e
llvm::ScalarEvolution::getUDivExpr(llvm::SCEV const*, llvm::SCEV const*) + 814
21 clang 0x00000000016ef69b
llvm::ScalarEvolution::createSCEV(llvm::Value*) + 2283
22 clang 0x00000000016f084b
llvm::ScalarEvolution::getSCEV(llvm::Value*) + 555
23 clang 0x00000000016efd23
llvm::ScalarEvolution::createSCEV(llvm::Value*) + 3955
24 clang 0x00000000016f084b
llvm::ScalarEvolution::getSCEV(llvm::Value*) + 555
25 clang 0x000000000169e507
llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*) + 551
26 clang 0x000000000169e975
llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*) + 1685
27 clang 0x000000000169e975
llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*) + 1685
28 clang 0x000000000169e975
llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*) + 1685
29 clang 0x000000000169ea6b llvm::IVUsers::runOnLoop(llvm::Loop*,
llvm::LPPassManager&) + 171
30 clang 0x00000000016bc1c4
llvm::LPPassManager::runOnFunction(llvm::Function&) + 1140
31 clang 0x00000000017dda7b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 587
32 clang 0x000000000167daeb
33 clang 0x000000000167e785
34 clang 0x00000000017df084
llvm::MPPassManager::runOnModule(llvm::Module&) + 500
35 clang 0x00000000017df20b llvm::PassManagerImpl::run(llvm::Module&)
+ 187
36 clang 0x000000000081e2e9
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 1625
37 clang 0x000000000081b0bb
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 251
38 clang 0x0000000000942c1f clang::ParseAST(clang::Sema&, bool) + 431
39 clang 0x000000000081a854 clang::CodeGenAction::ExecuteAction() +
68
40 clang 0x000000000070d783
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
41 clang 0x00000000006e8282
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1298
42 clang 0x00000000006df1fc cc1_main(char const**, char const**, char
const*, void*) + 524
43 clang 0x00000000006e736d main + 4445
44 libc.so.6 0x00007f03b1319abd __libc_start_main + 253
45 clang 0x00000000006dd949
Stack dump:
0. Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r128982-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20 -momit-leaf-frame-pointer -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r128982-install/bin/../lib/clang/3.0
-O2 -w -ferror-limit 19 -fmessage-length 97 -fgnu-runtime
-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 'Loop Pass Manager' on function '@func_14'
5. Running pass 'Induction Variable Users' on basic block '%for.inc9'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)
[regehr at gamow tmp010]$ clang -v
clang version 3.0 (trunk 128982)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp010]$ cat small.c
typedef char int8_t;
typedef int int16_t;
typedef char uint8_t;
typedef int uint16_t;
typedef int uint64_t;
uint8_t foo (int8_t si1, uint8_t si2)
{
return si1 * si2;
}
uint8_t bar (int16_t left, int right)
{
return left < right || right ? : left >> right;
}
uint8_t baz (uint8_t ui1, uint8_t ui2)
{
return ui1 * ui2;
}
uint8_t buz (uint16_t left, int right)
{
return right >= 32 || left >> right ? left : left << right;
}
uint8_t func_14 (uint16_t p_17, uint8_t p_18)
{
for (p_17 = 0; p_17 < 1; p_17 += 1)
{
}
for (0; 1; p_18 += 1)
if (bar (foo (baz (p_18, 1), buz (p_17, 13)), 0))
return 0;
}
--
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