> On Tue, 6 Nov 2018, Jan Hubicka wrote:
>
> > Hi,
> > this patch adds code to clear typeless storage flag. This is needed to
> > enable some more merging for C++ types containing char array.
> >
> > Bootstrapped/regtesed x86_64-linux, OK?
>
> OK. (I guess we could equally well set it to 1?)
Then we would need to set it for front-end built incomplete types as
well. Whatever I construct in here should better match real incomplete
type built by front-ends otherwise merging of other types referring to
this one via pointers won't happen.
Honza
>
> Richard.
>
> > Honza
> >
> > * tree.c (fld_incomplete_type_of): Clear TYPE_TYPELESS_STORAGE
> > flag.
> > Index: tree.c
> > ===================================================================
> > --- tree.c (revision 265835)
> > +++ tree.c (working copy)
> > @@ -5173,6 +5173,7 @@ fld_incomplete_type_of (tree t, struct f
> > SET_TYPE_ALIGN (copy, BITS_PER_UNIT);
> > TYPE_SIZE_UNIT (copy) = NULL;
> > TYPE_CANONICAL (copy) = TYPE_CANONICAL (t);
> > + TYPE_TYPELESS_STORAGE (copy) = 0;
> > if (AGGREGATE_TYPE_P (t))
> > {
> > TYPE_FIELDS (copy) = NULL;
> >
> >
>
> --
> Richard Biener <[email protected]>
> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB
> 21284 (AG Nuernberg)