<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:xw111luoye@gmail.com" title="Ye Luo <xw111luoye@gmail.com>"> <span class="fn">Ye Luo</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - compile-time crash when using target enter data to map a constexpr array"
   href="https://bugs.llvm.org/show_bug.cgi?id=46867">bug 46867</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>xw111luoye@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - compile-time crash when using target enter data to map a constexpr array"
   href="https://bugs.llvm.org/show_bug.cgi?id=46867#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - compile-time crash when using target enter data to map a constexpr array"
   href="https://bugs.llvm.org/show_bug.cgi?id=46867">bug 46867</a>
              from <span class="vcard"><a class="email" href="mailto:xw111luoye@gmail.com" title="Ye Luo <xw111luoye@gmail.com>"> <span class="fn">Ye Luo</span></a>
</span></b>
        <pre>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 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
01d59c0de822099c62f12f275c41338f6df9f5ac)
$ clang++ -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda constexpr.cpp &&
./a.out
print in target 0.000000 2.100000

It seems good now.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>