<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Omitting the optional variable-category of defaultmap clause causes Clang to abort"
   href="https://bugs.llvm.org/show_bug.cgi?id=45469">45469</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Omitting the optional variable-category of defaultmap clause causes Clang to abort
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jennifer.yu@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In OMP spec 5.0:

The syntax of the defaultmap clause is as follows:

defaultmap(implicit-behavior[:variable-category])

But current clang give error when omitting variable-category

cmplrllvm-11546>clang  -cc1 -fopenmp  -fopenmp-version=50 x.cpp
x.cpp:4:45: warning: missing ':' after defaultmap modifier - ignoring
  #pragma omp target defaultmap(firstprivate)
                                            ^
x.cpp:4:45: error: expected 'scalar', 'aggregate', 'pointer' in OpenMP clause
'defaultmap'
1 warning and 1 error generated.

cmplrllvm-11546>cat x.cpp
void implicit_maps_double_complex (int a){
  double _Complex dc = (double)a;

  #pragma omp target defaultmap(firstprivate)
  {
    dc *= dc;
  }
}</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>