Closed llvmbot closed 10 years ago
The additional tests seem to be working now
r206478 fixes the original bug. The other related testcases aren't really related, other than being the same common address space bug.
My apologies for not specifying the options to clang. I compile with:
clang -target nvptx--something -Xclang -fcuda-is-device
The something is not really important.
Created attachment 12001 [details] Related CUDA test case
Both of these work for me without my patch
I take it back, I forgot to specify the target as nvptx
Created attachment 12001 [details] Related CUDA test case
Both of these work for me without my patch
I've posted a patch for this: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140120/097806.html
Extended Description
-- Command Output (stderr):
Assertion failed: (CastInst::castIsValid(Instruction::BitCast, C, DstTy) && "Invalid constantexpr bitcast!"), function getBitCast, file Constants.cpp, line 1674. 0 libLLVM-3.4.dylib 0x000000010ff4a650 llvm::sys::PrintStackTrace(sFILE) + 40 1 libLLVM-3.4.dylib 0x000000010ff4aa3a SignalHandler(int) + 245 2 libsystem_platform.dylib 0x00007fff8f36a5aa _sigtramp + 26 3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1892244080 4 libLLVM-3.4.dylib 0x000000010ff4a8ae abort + 22 5 libLLVM-3.4.dylib 0x000000010ff4a898 abort + 0 6 libLLVM-3.4.dylib 0x000000010fb605f0 llvm::ConstantExpr::getAddrSpaceCast(llvm::Constant, llvm::Type*) + 0 7 clang 0x000000010ee034c5 std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> std::1::upper_bound<clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> >(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> const&, clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&) + 155959 8 clang 0x000000010ee02c4c std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> std::1::upper_bound<clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> >(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> const&, clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&) + 153790 9 clang 0x000000010ee04baf std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> std::1::__upper_bound<clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function*> >(std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> const&, clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&) + 161825 10 clang 0x000000010ee028ca std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> std::1::upper_bound<clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> >(std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function*> const&, clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&) + 152892 11 clang 0x000000010ee021eb std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> std::1::upper_bound<clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> >(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function>, std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function> const&, clang::CodeGen::CodeGenModule::GlobalInitPriorityCmp&) + 151133 12 clang 0x000000010ee6b3a0 std::1::vector_base<std::1::pair<unsigned int, unsigned int>, std::1::allocator<std::1::pair<unsigned int, unsigned int> > >::~vector_base() + 47336 13 clang 0x000000010ee6912a std::1::vector_base<std::1::pair<unsigned int, unsigned int>, std::1::allocator<std::1::pair<unsigned int, unsigned int> > >::~vector_base() + 38514 14 clang 0x000000010ee6a7cb std::1::vector_base<std::1::pair<unsigned int, unsigned int>, std::1::allocator<std::1::pair<unsigned int, unsigned int> > >::~vector_base() + 44307 15 clang 0x000000010ee6c521 std::1::vector_base<std::1::pair<unsigned int, unsigned int>, std::1::allocator<std::1::pair<unsigned int, unsigned int> > >::~vector_base() + 51817 16 clang 0x000000010ee921f0 std::1::split_buffer<clang::CodeGen::VBTableInfo, std::1::allocator&>:: split_buffer(unsigned long, unsigned long, std::1::allocator&) + 1026
17 clang 0x000000010ee5f60e void llvm::DeleteContainerSeconds<llvm::DenseMap<std:: 1::pair<clang::CXXRecordDecl const, clang::CharUnits>, clang::VTableLayout const, llvm::DenseMapInfo<std::1::pair<clang::CXXRecordDecl const*, clang::CharUnits> > > >(llvm::DenseMap<std::1::pair<clang::CXXRecordDecl const, clang::CharUnits>, clang::VTableLayout const, llvm::DenseMapInfo<std::1::pair<clang::CXXRecordDecl const*, clang::CharUnits> > >&) + 5834
18 clang 0x000000010eea35ec llvm::Type** std::1::uninitialized_copy<llvm::Type, llvm::Type>(llvm::Type, llvm::Type, llvm::Type*) + 474
19 clang 0x000000010ee5eefc void llvm::DeleteContainerSeconds<llvm::DenseMap<std::__1::pair<clang::CXXRecordDecl const, clang::CharUnits>, clang::VTableLayout const, llvm::DenseMapInfo<std::__1::pair<clang::CXXRecordDecl const, clang::CharUnits> > > >(llvm::DenseMap<std::1::pair<clang::CXXRecordDecl const, clang::CharUnits>, clang::VTableLayout const, llvm::DenseMapInfo<std::1::pair<clang::CXXRecordDecl const, clang::CharUnits> > >&) + 4024
20 clang 0x000000010ec9191f std::1::tree<std::1::pair<clang::edit::FileOffset, clang::edit::EditedSource::FileEdit>, std::1::map_value_compare<clang::edit::FileOffset, clang::edit::EditedSource::FileEdit, std::1::less, true>, std::1::allocator<std::1::pair<clang::edit::FileOffset, clang::edit::EditedSource::FileEdit> > >::destroy(std::1::tree_node<std::__1::pair<clang::edit::FileOffset, clang::edit::EditedSource::FileEdit>, void >) + 3953
21 clang 0x000000010ec75271 std::1::vector_base<clang::CompilerInstance, std::1::allocator<clang::CompilerInstance*> >::~vector_base() + 10149
22 clang 0x000000010ec4ca66 std::1::enable_if<is_forward_iterator<char const*>::value, void>::type std::1::basic_string<char, std::1::char_traits, std::1::allocator >:: init<char const>(char const, char const*) + 3328
23 clang 0x000000010ec46b5c
24 clang 0x000000010ec4b5c7 std::1::split_buffer<llvm::SourceMgr::SrcBuffer, std::1::allocator&>:: split_buffer(unsigned long, unsigned long, std::__1::allocator&) + 5817
25 libdyld.dylib 0x00007fff909715fd start + 1
26 libdyld.dylib 0x0000000000000036 start + 1869146682
Stack dump:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /var/tmp/program-259123.cl clang: note: diagnostic msg: /var/tmp/program-259123.sh clang: note: diagnostic msg: