> On Fri, 26 Jan 2018, Jan Hubicka wrote:
> 
> > > On Thu, 25 Jan 2018, Jan Hubicka wrote:
> > > 
> > > > Hi,
> > > > the testcase triggers invalid warning on type mismatch because array
> > > > of pointers to complete type has different alias set from array of 
> > > > pointers
> > > > to incomplete type.  This is valid, because incoplete pointer has alias 
> > > > set
> > > > of void_ptr which alias all pointers and arrays alias with their 
> > > > members.
> > > 
> > > But isn't that a problem?  Not if the pointer to incomlete type have
> > > alias set zero but IIRC they don't, right?
> > 
> > pointers to incomplete type are same as alias set of ptr_type_node (1 in 
> > this case)
> > and pointer to complete types have different alias set but that set has
> > is_pointer flag.  When checking for conflict we make 1 to alias with 
> > everything that
> > has is_pointer flag in it, so it will return true for these two array types.
> 
> Ah, ok.  The patch is ok then.  I suppose in theory complex pointers
> or vector pointers would have the same issue if we'd ever generate
> those (GIMPLE at least doens't like them ;)).

Yep, VECTOR_TYPE is only remaining case where get_alias_set recurse, but I would
wait for those to be actually used.  We will not only generate them but produce
static variables of them for waring to triger.

Honza

Reply via email to