<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 19, 2017 at 10:48 AM, Ivan A. Kosarev <span dir="ltr"><<a href="mailto:ikosarev@accesssoftek.com" target="_blank">ikosarev@accesssoftek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    Daniel,<span class="gmail-"><br>
    <br>
    > This is an aggregate type that includes a type compatible<br>
    > with the effective type of the object.  In particular,
    <div class="gmail_quote">> x->i is an lvalue expression of
      type "int"</div>
    <div class="gmail_quote">> b->a is an lvalue expression of
      type "struct A"</div>
    <div class="gmail_quote">> "struct A" is an aggregate type that
      includes "int" among<br>
      > its members.</div>
    </span><div class="gmail_quote"><span class="gmail-">> Therefore, the b->a object may
      access x->i by TBAA<br>
      <br></span>
      My understanding is in x->i there are two accesses by lvalue,
      of which the first one is (*x) and that lvalue is of type that is
      not compatible with [any part of] struct A.</div></div></blockquote><div><br></div><div>Assume we split it as you suggest, into foo = *x, foo.i and bar = *b, b.a</div><div> </div><div>*x contains a struct containing an int.</div><div><br></div><div>*b contains a struct containing a struct containing an int</div><div><br></div><span style="font-size:12.8px">" an aggregate or union type that includes one of the aforementioned types among its elements or nonstatic</span><br style="font-size:12.8px"><span style="font-size:12.8px">data members (including, recursively, an element or non-static data member of a subaggregate</span><br style="font-size:12.8px"><div><span style="font-size:12.8px">or contained union),"</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">This seems to fall into the "including, recursively" part.</span></div><div><br></div><div>But, let's assume that is true for a second. </div><div><br></div><div>GIven</div><div>struct A *a</div><div>struct X *x</div><div><br></div><div>a->i</div><div>x->i</div><div><br></div><div>Can these accesses alias?</div><div><br></div><div><br></div><div>struct B *b</div><div>struct X *x</div><div><br></div><div>b->a.i</div><div>x->i</div><div><br></div><div>How about these?</div><div><br></div><div><br></div><div><br></div></div></div></div>