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: unassignedclangb...@nondot.org
Reporter: jdoerf...@anl.gov
CC: a.bat...@hotmail.com, deepak.eachemp...@hpe.com,
jonathanchesterfi...@gmail.com, kkw...@gmail.com,
llvm-bugs@lists.llvm.org, ravi.narayanasw...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs