<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 --- - alpha.deadcode.UnreachableCode false positive"
   href="https://llvm.org/bugs/show_bug.cgi?id=31646">31646</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>alpha.deadcode.UnreachableCode false positive
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>4.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </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>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>kremenek@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bagnara@cs.unipr.it
          </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>Created <span class=""><a href="attachment.cgi?id=17842" name="attach_17842" title="Testcase allowing reproduction of the problem.">attachment 17842</a> <a href="attachment.cgi?id=17842&action=edit" title="Testcase allowing reproduction of the problem.">[details]</a></span>
Testcase allowing reproduction of the problem.

$ cat z.c
union U {
  int a;
};

int foo(union U u) {
  return u.a ? 1 : 0;
}

$ clang-4.0 -cc1 -analyze -analyzer-checker=alpha.deadcode.UnreachableCode z.c
z.c:6:20: warning: This statement is never executed
  return u.a ? 1 : 0;
                   ^
1 warning generated.
$ clang-4.0 --version
clang version 4.0.0-svn291446-1~exp1 (trunk)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$</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>