<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 --- - Clang generates broken module, "Instruction does not dominate all uses!""
   href="http://llvm.org/bugs/show_bug.cgi?id=21220">21220</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang generates broken module, "Instruction does not dominate all uses!"
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </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>david.majnemer@gmail.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>$ cat t.cpp
struct s {
  char c[33];
};
struct t {
  t(const s &);
};
extern int a;
void fn1() {
  switch (a) {
  case 0:
    *new t(s());
  case 1:
    (t(s()));
  }
}

$ ~/llvm/Debug+Asserts/bin/clang -cc1 -x c++ t.cpp -o - -emit-llvm -O1
-fexceptions
t.cpp:11:5: warning: expression result unused
    *new t(s());
    ^~~~~~~~~~~
Instruction does not dominate all uses!
  %call = call noalias i8* @_Znwm(i64 1) #4
  call void @_ZdlPv(i8* %call) #5
fatal error: error in backend: Broken function found, compilation aborted!</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>