<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 --- - Incorrect warning about uninitialized variable with `asm`"
   href="https://llvm.org/bugs/show_bug.cgi?id=31787">31787</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incorrect warning about uninitialized variable with `asm`
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>paulepanter@users.sourceforge.net
          </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>Clang 4.0.0-+rc1 shows a warning, which is – as far as I can see – incorrect.

```
$ clang-4.0 --version
clang version 4.0.0-+rc1-1 (tags/RELEASE_400/rc1)
Target: i686-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ git clone <a href="https://review.coreboot.org/memtest86plus">https://review.coreboot.org/memtest86plus</a>
$ cd memtest86plus
$ clang-4.0 -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin
-ffreestanding -fPIC  -fno-stack-protector -fgnu89-inline -fno-strict-aliasing
reloc.c
reloc.c:55:10: warning: variable 'got' is uninitialized when used here
[-Wuninitialized]
        return *got;
                ^~~
reloc.c:54:26: note: initialize the variable 'got' to silence this warning
        register Elf32_Addr *got asm ("%ebx");
                                ^
                                 = NULL
1 warning generated.
```

GCC 6.3.0 doesn’t show that warning.</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>