<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Infinite loop while parsing OpenMP directive"
   href="https://llvm.org/bugs/show_bug.cgi?id=25221">25221</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Infinite loop while parsing OpenMP directive
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </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>Runtime Library
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sfantao@us.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While attempting to compile this code (bla.cpp):


//##################
int nested(int a){
  #pragma omp parallel
    ++a;

 auto F = [&](){
   #pragma omp parallel
   {
     #pragma omp target
       ++a;
   }
 };
 F();
  return a;
}
//##################

With the frontend command:

clang -cc1 -internal-isystem $CLANG_PATH/bin/../lib/clang/3.8.0/include
-nostdsysteminc -fopenmp -x c++ -triple x86_64-unknown-unknown -o - bla.cpp

it gets into an infinite loop in the parser. Note that the code needs
-std=c++11, and adding this extra option makes the problem go away.
Nevertheless,  the compiler should not run forever if the user forgets to add
that.</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>