<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Compiling OpenCL example fails with llvm 3.4. Did work correctly with 3.3."
   href="http://llvm.org/bugs/show_bug.cgi?id=18567">18567</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compiling OpenCL example fails with llvm 3.4. Did work correctly with 3.3.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>elhigu@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11913" name="attach_11913" title="OpenCL input">attachment 11913</a> <a href="attachment.cgi?id=11913&action=edit" title="OpenCL input">[details]</a></span>
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*>
<span class="quote">>(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function*>*,</span >
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*>
<span class="quote">>(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function*>*,</span >
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*>
<span class="quote">>(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function*>*,</span >
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*>
<span class="quote">>(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function*>*,</span >
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*>
<span class="quote">>(std::__1::pair<clang::CodeGen::OrderGlobalInits, llvm::Function*>*,</span >
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> >
<span class="quote">>::~__vector_base() + 47336</span >
13 clang                    0x000000010ee6912a
std::__1::__vector_base<std::__1::pair<unsigned int, unsigned int>,
std::__1::allocator<std::__1::pair<unsigned int, unsigned int> >
<span class="quote">>::~__vector_base() + 38514</span >
14 clang                    0x000000010ee6a7cb
std::__1::__vector_base<std::__1::pair<unsigned int, unsigned int>,
std::__1::allocator<std::__1::pair<unsigned int, unsigned int> >
<span class="quote">>::~__vector_base() + 44307</span >
15 clang                    0x000000010ee6c521
std::__1::__vector_base<std::__1::pair<unsigned int, unsigned int>,
std::__1::allocator<std::__1::pair<unsigned int, unsigned int> >
<span class="quote">>::~__vector_base() + 51817</span >
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> >
<span class="quote">>::destroy(std::__1::__tree_node<std::__1::pair<clang::edit::FileOffset,</span >
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
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> 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: 

********************</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>