<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 - analyser reports real issue, but misses use of undefined variable on the way"
   href="https://bugs.llvm.org/show_bug.cgi?id=32925">32925</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>analyser reports real issue, but misses use of undefined variable on the way
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

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

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>analyze
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>yann.dirson@blade-group.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18410" name="attach_18410" title="buggy for/else">attachment 18410</a> <a href="attachment.cgi?id=18410&action=edit" title="buggy for/else">[details]</a></span>
buggy for/else

Behaviour observer in 3.8, 3.9, 4.0, and snapshot of 5.0 in Debian

$ scan-build clang++ -c ./src/foo.cpp
scan-build: Using '/usr/lib/llvm-3.8/bin/clang' for static analysis
./src/foo.cpp:28:20: warning: Dereference of undefined pointer value
    printf("%d\n", p->d);
                   ^~~~
1 warning generated.
scan-build: 1 bug found.


This is a buggy implementation of a pythobun-like "for / else" idiom.

In the path leading to this, which corresponds to m==0, the (i == m) test
compares m with uninitialized variable i.  It would seem logical to report this
first (the fact is, it is the root of the bug).</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>