<html>
    <head>
      <base href="http://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 --- - Assertion failed: (StateMapsArray[Block->getBlockID()] && "Block has no block info"), function borrowInfo, file tools/clang/lib/Analysis/Consumed.cpp, line 1080."
   href="http://llvm.org/bugs/show_bug.cgi?id=20402">20402</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: (StateMapsArray[Block->getBlockID()] && "Block has no block info"), function borrowInfo, file tools/clang/lib/Analysis/Consumed.cpp, line 1080.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dimitry@andric.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This assertion was reported by Benjamin Kaduk here:
<a href="http://lists.freebsd.org/pipermail/freebsd-current/2014-July/051348.html">http://lists.freebsd.org/pipermail/freebsd-current/2014-July/051348.html</a>

I reduced the test case to this very short .c file, which reproduces the
assertion with clang trunk r213143:

$ cat testcase.c
a;
GetToken() {
S1:
  switch (a)
  case ' ':
  goto S1;
  goto S1;
}
static
$ clang -v
clang version 3.5.0 (trunk 213143)
Target: x86_64-unknown-freebsd11.0
Thread model: posix
$ clang -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -Wconsumed testcase.c
clang -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -Wconsumed testcase.c
testcase.c:1:1: warning: type specifier missing, defaults to 'int'
a;
^
testcase.c:2:1: warning: type specifier missing, defaults to 'int'
GetToken() {
^~~~~~~~
Assertion failed: (StateMapsArray[Block->getBlockID()] && "Block has no block
info"), function borrowInfo, file
/share/dim/src/llvm/trunk/tools/clang/lib/Analysis/Consumed.cpp, line 1080.
Stack dump:
0.    Program arguments:
/share/dim/llvm/213143-trunk-freebsd11-amd64-aconf-rel-2/bin/clang -cc1 -triple
x86_64-unknown-freebsd11.0 -emit-obj -Wconsumed testcase.c
1.    testcase.c:9:1: current parser token 'static'
2.    testcase.c:2:12: parsing function body 'GetToken'
Abort trap

Obviously, a workaround is to remove -Wconsumed, but this warning was not
explicitly enabled the original reporter; he was using -Weverything.</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>