[LLVMbugs] [Bug 21388] New: cast<Ty>() argument of incompatible type

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Oct 26 20:11:37 PDT 2014


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

            Bug ID: 21388
           Summary: cast<Ty>() argument of incompatible type
           Product: libraries
           Version: trunk
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Transformation Utilities
          Assignee: unassignedbugs at nondot.org
          Reporter: housel at acm.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13253
  --> http://llvm.org/bugs/attachment.cgi?id=13253&action=edit
Preprocessed source and run script

Crash compiling code generated by the Open Dylan compiler C back-end.

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file /Users/housel/src/llvm/llvm/include/llvm/Support/Casting.h,
line 237.
0  clang-3.6                0x0000000101c7289e
llvm::sys::PrintStackTrace(__sFILE*) + 46
1  clang-3.6                0x0000000101c73dcb
PrintStackTraceSignalHandler(void*) + 27
2  clang-3.6                0x0000000101c74215 SignalHandler(int) + 565
3  libsystem_platform.dylib 0x00007fff91cd5f1a _sigtramp + 26
4  libsystem_platform.dylib 0x0000000000000002 _sigtramp + 1848811778
5  clang-3.6                0x0000000101c73dfb raise + 27
6  clang-3.6                0x0000000101c73eb2 abort + 18
7  clang-3.6                0x0000000101c73e91 __assert_rtn + 129
8  clang-3.6                0x00000001007d09bc
llvm::cast_retty<llvm::IntegerType, llvm::Type*>::ret_type
llvm::cast<llvm::IntegerType, llvm::Type>(llvm::Type*) + 108
9  clang-3.6                0x00000001014e38b8
llvm::ConstantInt::get(llvm::Type*, unsigned long long, bool) + 40
10 clang-3.6                0x00000001017eac54
llvm::InstCombiner::transformSExtICmp(llvm::ICmpInst*, llvm::Instruction&) +
244
11 clang-3.6                0x00000001017eb955
llvm::InstCombiner::visitSExt(llvm::SExtInst&) + 1285
12 clang-3.6                0x00000001017a710b
llvm::InstVisitor<llvm::InstCombiner,
llvm::Instruction*>::visit(llvm::Instruction&) + 1067
13 clang-3.6                0x00000001017a2715
llvm::InstCombiner::DoOneIteration(llvm::Function&, unsigned int) + 2741
14 clang-3.6                0x00000001017a3767
llvm::InstCombiner::runOnFunction(llvm::Function&) + 567
15 clang-3.6                0x000000010166a7fb
llvm::FPPassManager::runOnFunction(llvm::Function&) + 427
16 clang-3.6                0x00000001016dc061 (anonymous
namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&,
llvm::CallGraph&, bool&, bool&) + 801
17 clang-3.6                0x00000001016db8ce (anonymous
namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&,
llvm::CallGraph&, bool&) + 958
18 clang-3.6                0x00000001016db08c (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) + 476
19 clang-3.6                0x000000010166b514 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&) + 1412
20 clang-3.6                0x000000010166adbe
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 302
21 clang-3.6                0x000000010166bc91
llvm::legacy::PassManager::run(llvm::Module&) + 33
22 clang-3.6                0x0000000102465d1d (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
llvm::raw_ostream*) + 1517
23 clang-3.6                0x0000000102465522
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 114
24 clang-3.6                0x0000000102667b58
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1736
25 clang-3.6                0x0000000103130614 clang::ParseAST(clang::Sema&,
bool, bool) + 1268
26 clang-3.6                0x00000001020bcc4a
clang::ASTFrontendAction::ExecuteAction() + 522
27 clang-3.6                0x0000000102665ac3
clang::CodeGenAction::ExecuteAction() + 3939
28 clang-3.6                0x00000001020bc1c8 clang::FrontendAction::Execute()
+ 120
29 clang-3.6                0x000000010204c469
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1017
30 clang-3.6                0x0000000102123f41
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3201
31 clang-3.6                0x0000000100335340 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 2496
32 clang-3.6                0x0000000100328b6b
ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 171
33 clang-3.6                0x0000000100328050 main + 1264
34 libdyld.dylib            0x00007fff866f15c9 start + 1
35 libdyld.dylib            0x000000000000002c start + 2039540324
Stack dump:
0.    Program arguments: /usr/local/bin/clang-3.6 -cc1 -triple
x86_64-apple-macosx10.10.0 -emit-obj -disable-free -main-file-name di.c
-mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -dwarf-column-info
-coverage-file /Users/housel/di.c -resource-dir
/usr/local/bin/../lib/clang/3.6.0 -O1 -fdebug-compilation-dir /Users/housel
-ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature
-fmax-type-align=16 -fdiagnostics-show-option -o di.o -x c di.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module 'di.c'.
4.    Running pass 'Combine redundant instructions' on function
'@KfloorSVgeneric_arithmeticMbig_integersM3I'
clang-3.6: error: unable to execute command: Illegal instruction: 4
clang-3.6: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0 (220497)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
clang-3.6: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.6: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.6: note: diagnostic msg:
/var/folders/qp/29m5zhwn5tz249jmphcwc3mr0000gn/T/di-882096.c
clang-3.6: note: diagnostic msg:
/var/folders/qp/29m5zhwn5tz249jmphcwc3mr0000gn/T/di-882096.sh
clang-3.6: note: diagnostic msg: 

********************

-- 
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/20141027/2cd3e79b/attachment.html>


More information about the llvm-bugs mailing list