LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1049 - crash compiling inline asm
Summary: crash compiling inline asm
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Common Code Generator Code (show other bugs)
Version: 1.8
Hardware: PC Linux
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks: 862
  Show dependency tree
 
Reported: 2006-12-15 10:25 PST by Anton Korobeynikov
Modified: 2010-02-22 12:50 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments
Failed bytecode (7.05 KB, application/octet-stream)
2006-12-15 10:26 PST, Anton Korobeynikov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Korobeynikov 2006-12-15 10:25:45 PST
Qt-compiling series is continuing...

Attached bytecode forces llc to crash with assertion:

./llc bugpoint-reduced-simplified.bc
llc: /home/asl/proj/llvm/src/include/llvm/Support/Casting.h:199: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
llvm::ConstantSDNode, Y = llvm::SDOperand]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.
./llc((anonymous namespace)::PrintStackTrace()+0x1f)[0x85a8cef]
/lib/libc.so.6(abort+0xeb)[0xb7d6d133]
/lib/libc.so.6(__assert_fail+0xeb)[0xb7d654f3]
./llc(llvm::ScheduleDAG::EmitNode(llvm::SDNode*, std::map<llvm::SDNode*,
unsigned int, std::less<llvm::SDNode*>, std::allocator<std::pair<llvm::SDNode*
const, unsigned int> > >&)+0x1079)[0x840dcd9]
Comment 1 Anton Korobeynikov 2006-12-15 10:26:35 PST
Created attachment 516 [details]
Failed bytecode
Comment 2 Chris Lattner 2006-12-16 14:31:09 PST
This looks like an inline asm bug.
Comment 3 Chris Lattner 2006-12-16 15:17:24 PST
Fixed.  This was a subtle nasty bug with a simple fix.  Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061211/041497.html

Testcase here:
CodeGen/Generic/2006-12-16-InlineAsmCrash.ll

Thanks!

-Chris