[llvm-bugs] [Bug 32506] New: ld cannot link tests with #pragma omp atomic

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 3 08:59:08 PDT 2017


            Bug ID: 32506
           Summary: ld cannot link tests with #pragma omp atomic
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ilia.taraban at intel.com
                CC: llvm-bugs at lists.llvm.org

int main(){
  struct {
    char a ;
    int b:16;
  }  s;
  #pragma omp atomic


>>>clang -v
clang version 5.0.0 (trunk 299342)

>>>clang -O0 -fopenmp atomic.c
/tmp/atomic-36a041.o: In function `main':
atomic.c:(.text+0x39): undefined reference to `__atomic_load'
atomic.c:(.text+0x7b): undefined reference to `__atomic_compare_exchange'

But if you add "-latomic":

>>>clang -O0 -fopenmp atomic.c -latomic
(no errors)

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/20170403/0a9a873e/attachment.html>

More information about the llvm-bugs mailing list