[LLVMbugs] [Bug 9921] New: UNREACHABLE at LegalizeIntegerTypes.cpp:982 when using clang's -ftrapv
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun May 15 08:20:23 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9921
Summary: UNREACHABLE at LegalizeIntegerTypes.cpp:982 when using
clang's -ftrapv
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: alexei.svitkine at gmail.com
CC: llvmbugs at cs.uiuc.edu
Compile this code:
long long f(int a, int b)
{
return (long long)a * (long long)b;
}
Using command-line:
/usr/local/bin/clang -ftrapv -arch i386 test.c
Result:
ExpandIntegerResult #0: 0x10285cc10: i64,i1 = smulo 0x10285bf10, 0x102862910
[ORD=7] [ID=0]
Do not know how to expand the result of this operator!
UNREACHABLE executed at LegalizeIntegerTypes.cpp:982!
0 clang 0x00000001016ec5e2
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
754
1 clang 0x00000001016ed433
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
4419
2 libSystem.B.dylib 0x00007fff80a9e66a _sigtramp + 26
3 libSystem.B.dylib 0x00007fff5fbfc950 _sigtramp + 3742753536
4 clang 0x00000001016eca06
llvm::SmallVectorTemplateBase<llvm_regmatch_t, false>::grow(unsigned long) +
1814
5 clang 0x00000001016d7f2d std::_Rb_tree<std::string,
std::pair<std::string const, void*>, std::_Select1st<std::pair<std::string
const, void*> >, std::less<std::string>, std::allocator<std::pair<std::string
const, void*> >
>::_M_insert_unique(std::_Rb_tree_iterator<std::pair<std::string const, void*>
>, std::pair<std::string const, void*> const&) + 2365
6 clang 0x0000000100f85784
llvm::EVT::getHalfSizedIntegerVT(llvm::LLVMContext&) const + 210996
7 clang 0x0000000100f92015
llvm::TargetLowering::getTypeToExpandTo(llvm::LLVMContext&, llvm::EVT) const +
42773
8 clang 0x0000000100f938ee
llvm::TargetLowering::getTypeToExpandTo(llvm::LLVMContext&, llvm::EVT) const +
49134
9 clang 0x000000010108b737
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 48007
10 clang 0x000000010108e3f6
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 59462
11 clang 0x000000010108ecd6
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 61734
12 clang 0x000000010108f5ac
llvm::FunctionLoweringInfo::InitializeRegForValue(llvm::Value const*) + 63996
13 clang 0x00000001011b4933
llvm::MachineFunctionAnalysis::getPassName() const + 627
14 clang 0x000000010161f200 llvm::BasicBlockPass::~BasicBlockPass()
+ 35648
15 clang 0x000000010161f31b llvm::BasicBlockPass::~BasicBlockPass()
+ 35931
16 clang 0x0000000101620e8f llvm::BasicBlockPass::~BasicBlockPass()
+ 42959
17 clang 0x0000000101621191 llvm::BasicBlockPass::~BasicBlockPass()
+ 43729
18 clang 0x00000001016212ad llvm::BasicBlockPass::~BasicBlockPass()
+ 44013
19 clang 0x000000010019723a clang::PCHGenerator::~PCHGenerator() +
6650
20 clang 0x00000001002d32ae
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 286
21 clang 0x00000001003053b4 llvm::IRBuilder<true,
llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true>
>::CreateAdd(llvm::Value*, llvm::Value*, llvm::Twine const&, bool, bool) + 788
22 clang 0x00000001002d19dc
llvm::DenseMap<clang::CodeGen::GlobalDecl, long long,
llvm::DenseMapInfo<clang::CodeGen::GlobalDecl>, llvm::DenseMapInfo<long long>
>::grow(unsigned int) + 2188
23 clang 0x00000001000582a1 llvm::DenseMap<clang::IdentifierInfo
const*, unsigned int, llvm::DenseMapInfo<clang::IdentifierInfo const*>,
llvm::DenseMapInfo<unsigned int> >::grow(unsigned int) + 8945
24 clang 0x00000001000243b5 std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert_unique(std::string const&) + 1893
25 clang 0x000000010001b608
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::PassRegistrationListener**,
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*> > >,
llvm::PassRegistrationListener* const&) + 9352
26 clang 0x0000000100023572 std::vector<std::string,
std::allocator<std::string> >::operator=(std::vector<std::string,
std::allocator<std::string> > const&) + 12962
27 clang 0x000000010001aa24
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::PassRegistrationListener**,
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*> > >,
llvm::PassRegistrationListener* const&) + 6308
28 clang 0x0000000000000022
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::PassRegistrationListener**,
std::vector<llvm::PassRegistrationListener*,
std::allocator<llvm::PassRegistrationListener*> > >,
llvm::PassRegistrationListener* const&) + 4294864546
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
i386-apple-macosx10.6.7 -emit-obj -mrelax-all -disable-free -main-file-name
test.c -pic-level 1 -mdisable-fp-elim -masm-verbose -target-cpu yonah
-target-linker-version 97.17 -resource-dir /usr/local/bin/../lib/clang/3.0
-ferror-limit 19 -fmessage-length 151 -ftrapv -stack-protector 1 -fblocks
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/FO/FOr7SrssHeih0IrqrNZkbE+++TI/-Tmp-/cc-Ij0o1R.o -x c test.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'test.c'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
clang: error: unable to execute command: Illegal instruction
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)
--
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