<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - omp_target_alloc link errors"
href="https://bugs.llvm.org/show_bug.cgi?id=45458">45458</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>omp_target_alloc link errors
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Runtime Library
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tom.deakin@bristol.ac.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23318" name="attach_23318" title="Source code reproducer">attachment 23318</a> <a href="attachment.cgi?id=23318&action=edit" title="Source code reproducer">[details]</a></span>
Source code reproducer
The attached code does not link with LLVM 10.0.
Build:
$ clang -O3 omp_target_alloc.c -fopenmp
Compiler output:
/tmp/omp_target_alloc-875632.o: In function `main':
omp_target_alloc.c:(.text+0xe): undefined reference to `omp_target_alloc'
clang-10: error: linker command failed with exit code 1 (use -v to see
invocation)
The code simply tries to allocate data on the default target device.
The following compiler flag makes the code link:
-fopenmp-targets=x86_64
However, the binary returns a null pointer at runtime.
If a GPU target is specified by instead adding this flag, a null pointer is
still returned.
-fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_75</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>