> So the important thing is that during matching the paths
> aptr->a and *bptr we return false for
> same_type_for_tbaa (int *, struct a *), correct? But if
> we can do that then the alias sets should not conflict in
> the first place and we shouldn't need any path-based disambiguation
> here.
>
> So to me this is the wrong place to fix.
The alias sets of int * conflict with alias set of struct a *
since that one is same as void * and we make void * to conflict
with all pointers.
However we also do not want to return -1 for things like
same_type_for_tbaa (int *, struct a)
which we do currently, since int * is TYPE_STRUCTURAL_EQUALITY
and struct a is not.
Here you may declare struct a as
struct a {int *a;};
and alias sets will be in conflict even w/o void * globing.
Honza