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

Ye Luo <xw111lu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xw111lu...@gmail.com
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Ye Luo <xw111lu...@gmail.com> ---
I just tried
```
#include <cstdio>
#define LENGTH 2
int main()
{
  constexpr double h_chebyshev_coefs[LENGTH] = { 0, 2.1 };
#pragma omp target enter data map(to:h_chebyshev_coefs[0:LENGTH])
  #pragma omp target
  {
    printf("print in target %lf %lf\n", h_chebyshev_coefs[0],
h_chebyshev_coefs[1]);
  }
  return 0;
}
```
$ clang++ -v
clang version 14.0.0 (https://github.com/llvm/llvm-project.git
01d59c0de822099c62f12f275c41338f6df9f5ac)
$ clang++ -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda constexpr.cpp &&
./a.out
print in target 0.000000 2.100000

It seems good now.

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

Reply via email to