<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - Clang trunk crash in ConsumedStateMap::intersectAtLoopHead"
   href="http://llvm.org/bugs/show_bug.cgi?id=17574">bug 17574</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;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>jonathan.sauer@gmx.de
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>DUPLICATE
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - Clang trunk crash in ConsumedStateMap::intersectAtLoopHead"
   href="http://llvm.org/bugs/show_bug.cgi?id=17574#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - Clang trunk crash in ConsumedStateMap::intersectAtLoopHead"
   href="http://llvm.org/bugs/show_bug.cgi?id=17574">bug 17574</a>
              from <span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span></b>
        <pre>Further reduced, crashes clang r192574 when compiling with -Wconsumed:

class runtime_error 
{
public:
    virtual ~runtime_error();
};

void read(bool sf) {
    while (sf) {
        if(sf) throw runtime_error();
    }
}


This results in:

% ~/LLVM/build/Release+Asserts/bin/clang++ -c -Wconsumed clang.cpp
Assertion failed: (Block->pred_size() == 1 && *Block->pred_begin() &&
Block->succ_size() != 0), function getLastStmtLoc, file
/Users/rynnsauer/LLVM/llvm/tools/clang/lib/Analysis/Consumed.cpp, line 70.
[...]


Removing the virtual destructor makes the crash go away. This looks identical
to <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Assertion in getLastStmtLoc with "continue" in loop and -Wconsumed"
   href="show_bug.cgi?id=17570">bug 17570</a> (but with an exception instead of "continue"). I'm adding this
comment to <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Assertion in getLastStmtLoc with "continue" in loop and -Wconsumed"
   href="show_bug.cgi?id=17570">bug 17570</a> as well and closing this one as a duplicate.

*** This bug has been marked as a duplicate of <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Assertion in getLastStmtLoc with "continue" in loop and -Wconsumed"
   href="show_bug.cgi?id=17570">bug 17570</a> ***</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>