[LLVMbugs] [Bug 18567] New: Compiling OpenCL example fails with llvm 3.4. Did work correctly with 3.3.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 21 01:12:31 PST 2014


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

            Bug ID: 18567
           Summary: Compiling OpenCL example fails with llvm 3.4. Did work
                    correctly with 3.3.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: elhigu at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11913
  --> http://llvm.org/bugs/attachment.cgi?id=11913&action=edit
OpenCL input

--
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<clang::CodeGen::VBTableInfo>&>::__split_buffer(unsigned
long, unsigned long, std::__1::allocator<clang::CodeGen::VBTableInfo>&) + 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<clang::edit::FileOffset>,
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<char>,
std::__1::allocator<char> >::__init<char const*>(char const*, char const*) +
3328
23 clang                    0x000000010ec46b5c
24 clang                    0x000000010ec4b5c7
std::__1::__split_buffer<llvm::SourceMgr::SrcBuffer,
std::__1::allocator<llvm::SourceMgr::SrcBuffer>&>::__split_buffer(unsigned
long, unsigned long, std::__1::allocator<llvm::SourceMgr::SrcBuffer>&) + 5817
25 libdyld.dylib            0x00007fff909715fd start + 1
26 libdyld.dylib            0x0000000000000036 start + 1869146682
Stack dump:
0.    Program arguments: /usr/local/Cellar/llvm/3.4/bin/clang -cc1 -triple
x86_64-apple-macosx10.9.0 -emit-llvm-bc -disable-free -main-file-name
program.cl -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-ffp-contract=off -masm-verbose -munwind-tables -target-cpu core-avx-i
-target-linker-version 224.1 -coverage-file /tmp/poclps7zdw/pthread/program.bc
-resource-dir /usr/local/Cellar/llvm/3.4/bin/../lib/clang/3.4 -include
/Users/mikaelle/Projects/Vincit/webcl/pocl-testing/install-0.9/share/pocl/include/_kernel.h
-D __OPENCL_VERSION__=120 -I . -Wno-format -fgnu-keywords
-fdebug-compilation-dir
/Users/mikaelle/Projects/Vincit/webcl/build-3.4-makefiles/tools/clang/tools/webcl-validator/test
-ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign
-fno-builtin -fblocks -fobjc-runtime=macosx-10.9.0
-fencode-extended-block-signature -fdiagnostics-show-option -vectorize-slp
-ffake-address-space-map -ffake-address-space-map -o
/tmp/poclps7zdw/pthread/program.bc -x cl /tmp/poclps7zdw//program.cl 
1.    /tmp/poclps7zdw//program.cl:136:1: current parser token '__constant'
2.    /tmp/poclps7zdw//program.cl:130:39: LLVM IR generation of declaration
'constant_array_pointer_struct'
3.    /tmp/poclps7zdw//program.cl:130:39: Generating code for declaration
'constant_array_pointer_struct'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-apple-macosx10.9.0
Thread model: posix
clang: 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: note: diagnostic msg: 
********************

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: 

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

-- 
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/20140121/163529ae/attachment.html>


More information about the llvm-bugs mailing list