[llvm-bugs] [Bug 49649] New: The introduction of $ref globals is not always valid

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 19 07:54:20 PDT 2021


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

            Bug ID: 49649
           Summary: The introduction of $ref globals is not always valid
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jdoerfert at anl.gov
                CC: a.bataev at hotmail.com, deepak.eachempati at hpe.com,
                    jonathanchesterfield at gmail.com, kkwli0 at gmail.com,
                    llvm-bugs at lists.llvm.org, ravi.narayanaswamy at intel.com

If we have code like (https://godbolt.org/z/3neTaj)
```
#include <omp.h>

#pragma omp declare target

static int X;
#pragma omp allocate(X) allocator(omp_pteam_mem_alloc)

#pragma omp end declare target
```

we cannot introduce the $ref variable because the ptx:
```
.shared .align 4 .u32 X;
.global .align 8 .u64 _X$ref = X;
```
is invalid, a global is initialized with a shared value.

That said, I'm unsure $ref should ever be used. I didn't
find the a bug report or detailed explanation in the
original commit 3823514b56d92

-- 
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/20210319/edbad476/attachment.html>


More information about the llvm-bugs mailing list