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

            Bug ID: 49636
           Summary: Assertion `(!Entry.getAddress() || Entry.getAddress()
                    == Addr) && "Resetting with the new address."' failed.
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

This works or fails depending if BROKEN or WORKING1/WORKING2 are defined:

clang++ -S -x c++ -O1 -std=c++17 -target nvptx64 -Xclang -emit-llvm-bc -Xclang
-aux-triple -Xclang x86_64-unknown-linux-gnu -fopenmp -fopenmp-cuda-mode
-Xclang -fopenmp-is-device  /tmp/a.cpp  -DBROKEN

```
typedef enum omp_allocator_handle_t {
  omp_null_allocator = 0,
  omp_default_mem_alloc = 1,
  omp_large_cap_mem_alloc = 2,
  omp_const_mem_alloc = 3,
  omp_high_bw_mem_alloc = 4,
  omp_low_lat_mem_alloc = 5,
  omp_cgroup_mem_alloc = 6,
  omp_pteam_mem_alloc = 7,
  omp_thread_mem_alloc = 8,
  KMP_ALLOCATOR_MAX_HANDLE = ~(0U)
} omp_allocator_handle_t;

#pragma omp declare target

bool isSPMDMode();
bool isMainThreadInGenericMode() {
  return isSPMDMode();
}

bool IsSPMDMode [[clang::loader_uninitialized]];
#pragma omp allocate(IsSPMDMode) allocator(omp_pteam_mem_alloc)

void init(bool IsSPMD) { IsSPMDMode = IsSPMD; }

bool isSPMDMode() { return IsSPMDMode; }

#pragma omp end declare target
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to