<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 --- - False positive "Function call argument is an uninitialized value" after assigning through another, equivalent struct pointer when using bitfields"
href="http://llvm.org/bugs/show_bug.cgi?id=17861">17861</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>False positive "Function call argument is an uninitialized value" after assigning through another, equivalent struct pointer when using bitfields
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</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>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dougie.richardson@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>Created <span class=""><a href="attachment.cgi?id=11504" name="attach_11504" title="Xcode project demonstrating problem">attachment 11504</a> <a href="attachment.cgi?id=11504&action=edit" title="Xcode project demonstrating problem">[details]</a></span>
Xcode project demonstrating problem
I have two structs, both packed and 12 bytes long. One struct uses bitfield and
the other does not. If I take a pointer to the first struct, and then pass it
to a function that in turn casts it to a pointer to the second struct and
initializes the values, the static analyzer reports the values are
uninitialized.
The attached Xcode project demonstrates the problem.
I was able to workaround the problem by creating a union that contains the two
structs and passing that around instead.</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>