<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 --- - rsp register considered uninitialized"
href="https://llvm.org/bugs/show_bug.cgi?id=26518">26518</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>rsp register considered uninitialized
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cardoe@cardoe.com
</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>Using: Ubuntu clang version 3.8.0-svn257166-1~exp1 (trunk) (based on LLVM
3.8.0)
The following code:
static inline struct cpu_info *get_cpu_info(void)
{
register unsigned long sp asm("rsp");
return (struct cpu_info *)((sp & ~(STACK_SIZE-1)) + STACK_SIZE) - 1;
}
Results in an uninitialized warning for the variable 'sp' when compiling with
clang. GCC conversely does not report the variable as uninitialized but the
syntax does look like a GCCism. However I think it can be safe to assume that
rsp is initialized so this is probably a small corner case.
Build seen at: <a href="https://travis-ci.org/cardoe/xen/jobs/107263394">https://travis-ci.org/cardoe/xen/jobs/107263394</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>