[llvm-bugs] [Bug 45458] New: omp_target_alloc link errors
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 7 05:13:30 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45458
Bug ID: 45458
Summary: omp_target_alloc link errors
Product: OpenMP
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: release blocker
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: tom.deakin at bristol.ac.uk
CC: llvm-bugs at lists.llvm.org
Created attachment 23318
--> https://bugs.llvm.org/attachment.cgi?id=23318&action=edit
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
--
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/20200407/d061c30e/attachment.html>
More information about the llvm-bugs
mailing list