[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


https://bugs.llvm.org/show_bug.cgi?id=32506

            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

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

=======================================

>>>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