<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:ikosarev@accesssoftek.com" title="Ivan Kosarev <ikosarev@accesssoftek.com>"> <span class="fn">Ivan Kosarev</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Bug in union member handling in TBAA"
href="https://bugs.llvm.org/show_bug.cgi?id=35503">bug 35503</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>REOPENED
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Bug in union member handling in TBAA"
href="https://bugs.llvm.org/show_bug.cgi?id=35503#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Bug in union member handling in TBAA"
href="https://bugs.llvm.org/show_bug.cgi?id=35503">bug 35503</a>
from <span class="vcard"><a class="email" href="mailto:ikosarev@accesssoftek.com" title="Ivan Kosarev <ikosarev@accesssoftek.com>"> <span class="fn">Ivan Kosarev</span></a>
</span></b>
<pre>(In reply to Hal Finkel from <a href="show_bug.cgi?id=35503#c6">comment #6</a>)
<span class="quote">> (In reply to Ivan Kosarev from <a href="show_bug.cgi?id=35503#c4">comment #4</a>)
> > The failure is caused by this snippet:
> >
> > ---
> > short *q;
> > p->u.vec[i] = 0;
> > q = &p->u.vec[16];
> > *q = 1;
> > return p->u.vec[i];
> > ---
> >
> > LLVM currently implements a TBAA model that assumes that differently-typed
> > accesses may never alias. For this reason we require accesses to union
> > members to have their most enclosed union objects specified explicitly and
> > taking addresses of union members is thus not allowed in strict-aliasing
> > mode.
>
> No, I don't believe that's a model we do, or can, implement. What we have
> agreed is that type-changing accesses must be explicitly through the
> containing union. This, however, does not prohibit taking points to union
> members. It simply means that access through such pointers can't be
> type-changing accesses.</span >
Ah, I see. So the idea is that type-changing accesses work as barriers, and
between that barriers types of pointers match the types of objects they point
to. I think we can implement this. Will prepare another patch. Thanks a lot for
the clarifications!</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>