<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:lebedev.ri@gmail.com" title="Roman Lebedev <lebedev.ri@gmail.com>"> <span class="fn">Roman Lebedev</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - OpenMP default(none) + schedule(dynamic, variable) - difference with gcc"
   href="https://bugs.llvm.org/show_bug.cgi?id=41767">bug 41767</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>jdoerfert@anl.gov
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">See Also</td>
           <td>
                
           </td>
           <td>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90406
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>FIXED
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - OpenMP default(none) + schedule(dynamic, variable) - difference with gcc"
   href="https://bugs.llvm.org/show_bug.cgi?id=41767#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - OpenMP default(none) + schedule(dynamic, variable) - difference with gcc"
   href="https://bugs.llvm.org/show_bug.cgi?id=41767">bug 41767</a>
              from <span class="vcard"><a class="email" href="mailto:lebedev.ri@gmail.com" title="Roman Lebedev <lebedev.ri@gmail.com>"> <span class="fn">Roman Lebedev</span></a>
</span></b>
        <pre>... and i had to revert this & the other commit. Sorry :(
This implementation isn't sound as per the standard.
It erroneously diagnoses e.g. the following case:
```
$ cat test.cpp
void f(int n) {
 #pragma omp parallel default(none) if(n)
    ;
}
```
```
$ ./bin/clang -fopenmp test.cpp
test.cpp:2:40: error: variable 'n' must have explicitly specified data sharing
attributes
 #pragma omp parallel default(none) if(n)
                                       ^
test.cpp:2:31: note: explicit data sharing attribute requested here
 #pragma omp parallel default(none) if(n)
                              ^
1 error generated.
```

As per OpenMP Application Programming Interface Version 5.0 November 2018:
* 2.19.4.1default Clause
  The default clause explicitly determines the data-sharing attributes of
  variables that are referenced *in a parallel, teams, or task generating
  construct and would otherwise be implicitly determined
  (see Section 2.19.1.1 on page 270).
* 2.6.1 Determining the Number of Threads for a parallel Region
  Using a variable in an if or num_threads clause expression of a parallel
  construct causes an implicit reference to the variable in all enclosing
  constructs. The if clause expression and the num_threads clause expression
  are evaluated in the context outside of the parallel construct,</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>