This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [middle-end] PR c/29092, vector types not compatible when they should be


On Thu, 28 Sep 2006, Andrew Pinski wrote:
> > On Wed, 27 Sep 2006, Paolo Bonzini wrote:
> > http://gcc.gnu.org/ml/gcc-patches/2006-09/msg01215.html
> > > 2006-09-25  Paolo Bonzini  <bonzini@gnu.org>
> > >
> > >	PR c/29092
> > >	* tree.c (make_vector_type): Memoize types.
> > >	(used_vector_types): New.
> >
> > Hmm.  I'm not really happy with the way that you're using the front-end
> > specific types_compatible_p langhook to decide whether to create a new
> > VECTOR_TYPE node or not.  The middle-end, and particulary new type
> > construction in tree.c has/needs a stricter type system...
>
> Shouldn't this be more like what we do for arrays?  Note I have not
> looked into how we deal with arrays but I know that we can do
> make_array_type and have it return the same array type twice.

Good catch!  It does look like this is a job for type_hash_canon,
but the current vector main variant building/hashing code in
make_vector_type might need a rewrite.

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]