<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 - [5.0] taskwait with depend clause not supported"
   href="https://bugs.llvm.org/show_bug.cgi?id=46196">46196</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[5.0] taskwait with depend clause not supported
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Clang Compiler Support
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>protze@itc.rwth-aachen.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat taskwait-depend.c
int main(){
  int a;
#pragma omp task depend(out:a)
{}
#pragma omp taskwait depend(in:a)
}

$ clang -fopenmp -fopenmp-version=50 taskwait-depend.c
taskwait-depend.c:5:22: error: unexpected OpenMP clause 'depend' in directive
'#pragma omp taskwait'
#pragma omp taskwait depend(in:a)


OpenMP 5.0 introduced taskwait with the depend clause as an alias for:

#pragma omp task if(0) depend(in:a)
{}


Clang should generate code to call __kmpc_omp_wait_deps (as it does for the
included task). It is not necessary to generate code for the empty task.



OpenMP 5.1 will additionally introduce the nowait clause for taskwait, which
allows to add empty dependency nodes to the DAG.

#pragma omp taskwait depend(in:a) depend(out:b) nowait

is equivalent to

#pragma omp task depend(in:a) depend(out:b)
{}</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>