<html>
    <head>
      <base href="https://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 --- - assert failure when compiling trivial openmp program"
   href="https://llvm.org/bugs/show_bug.cgi?id=31417">31417</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>assert failure when compiling trivial openmp program
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>yaron.keren@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>a.bataev@hotmail.com, kiyolee@hotmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat file1.cpp
void foo() {
#pragma omp target
  ;
}

$ clang -fopenmp -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm-bc -o a.bc
file1.cpp
#0 0x00000000016e12a5 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/clang-4.0+0x16e12a5)
#1 0x00000000016e18f6 SignalHandler(int) (/usr/local/bin/clang-4.0+0x16e18f6)
#2 0x00007f2e6ac67390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#3 0x000000000118ec6a
llvm::MachineBasicBlock::addSuccessor(llvm::MachineBasicBlock*,
llvm::BranchProbability) (/usr/local/bin/clang-4.0+0x118ec6a)
#4 0x0000000001cbf11a llvm::SelectionDAGBuilder::visitBr(llvm::BranchInst
const&) (/usr/local/bin/clang-4.0+0x1cbf11a)
#5 0x0000000001cbd0f2 llvm::SelectionDAGBuilder::visit(llvm::Instruction
const&) (/usr/local/bin/clang-4.0+0x1cbd0f2)
#6 0x0000000001d34d80
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
false, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false,
false, void>, false, true>, bool&) (/usr/local/bin/clang-4.0+0x1d34d80)
#7 0x0000000001d3439d
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/usr/local/bin/clang-4.0+0x1d3439d)
#8 0x0000000001d32717
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/usr/local/bin/clang-4.0+0x1d32717)
#9 0x00000000011b26d6 llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/local/bin/clang-4.0+0x11b26d6)
#10 0x00000000013b5b33 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/bin/clang-4.0+0x13b5b33)
#11 0x00000000013b5d23 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/bin/clang-4.0+0x13b5d23)
#12 0x00000000013b6108 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/bin/clang-4.0+0x13b6108)
#13 0x0000000001824ba2 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/bin/clang-4.0+0x1824ba2)
#14 0x0000000001dce7dd
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/bin/clang-4.0+0x1dce7dd)
#15 0x000000000218dbb6 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/bin/clang-4.0+0x218dbb6)
#16 0x0000000001b3ac3f clang::FrontendAction::Execute()
(/usr/local/bin/clang-4.0+0x1b3ac3f)
#17 0x0000000001b04708
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/bin/clang-4.0+0x1b04708)
#18 0x0000000001baec5c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/bin/clang-4.0+0x1baec5c)
#19 0x00000000007f2fdc cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/bin/clang-4.0+0x7f2fdc)
#20 0x00000000007f1be6 main (/usr/local/bin/clang-4.0+0x7f1be6)
#21 0x00007f2e697bd830 __libc_start_main
/build/glibc-t3gR2i/glibc-2.23/csu/../csu/libc-start.c:325:0
#22 0x00000000007ef069 _start (/usr/local/bin/clang-4.0+0x7ef069)
Stack dump:
0.      Program arguments: /usr/local/bin/clang-4.0 -cc1 -triple
nvptx-nvidia-cuda -S -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name file1.cpp -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -fmath-errno -no-integrated-as -dwarf-column-info
-debugger-tuning=gdb -resource-dir /usr/local/bin/../lib/clang/4.0.0
-fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir /a/b/c
-ferror-limit 19 -fmessage-length 136 -fopenmp -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/file1-7803ff.s -x c++ file1.cpp -fopenmp-is-device
-fopenmp-host-ir-file-path /tmp/file1-72cf26.bc
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'file1.cpp'.
4.      Running pass 'NVPTX DAG->DAG Pattern Instruction Selection' on function
'@__omp_offloading_802_363c14__Z3foov_l2'
clang-4.0: error: unable to execute command: Segmentation fault (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 289871)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-4.0: 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-4.0: note: diagnostic msg: Error generating preprocessed source(s).</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>