<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 - [Coverage] Assertion when using _Pragma("unroll()")"
   href="https://bugs.llvm.org/show_bug.cgi?id=40971">40971</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Coverage] Assertion when using _Pragma("unroll()")
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>Wolfgang_Pieb@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>// Given the following source:

typedef float float4 __attribute__((ext_vector_type(4)));
typedef float4 float4Matrix[3][3];

void foo()
{
  float4Matrix K;
  for (int i=0; i<3; i++)
    _Pragma("unroll(3)")
    for (int j=0; j<=i; j++) K[i][j]=0;
}
// End of source

when compiled with 
clang -cc1 -emit-obj -target-cpu btver2 -fprofile-instrument=clang
-fcoverage-mapping <file>

gets the following compile time error:
fatal error: error in backend: File exit not handled before popRegions

When the _Pragma() is removed the compilation succeeds.

This appears to have been introduced by r229748. Note that to reproduce with
that version you have to substitute '-fprofile-instrument=clang' with
'-fprofile-instr-generate'.</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>