> > type T1 is record
> >    J : Integer;
> > end record;
> >
> > X1 : T1;
> >
> > => then X1.J "address" cannot be taken in legal Ada, so no integer
> > pointer can ever point to it.
> 
> However, can a pointer to X1, stored into, affect J?

Of course.

> If so, field J's alias set must be marked as a subset of X1's alias
> set, or we will get the info wrong.  

"field J" doesn't *have* an alias set (only references do) and any
reference to field J will have the alias set of T1 (see get_alias_set).
So they conflict.

If you insist on asking "what is the alias set of field J", you get it by
        DECL_NONADDRESSABLE_P (decl_of_j)
            ? TYPE_ALIAS_SET (DECL_CONTEXT (decl_of_j))
            : TYPE_ALIAS_SET (TREE_TYPE (decl_of_j))

Reply via email to