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: [PATCH] Fix PR C++/3172, wrongly turning reference of a vector type into pointer to a vector type


On 4/29/07, Andrew_Pinski@playstation.sony.com
<Andrew_Pinski@playstation.sony.com> wrote:
Hi,
  The problem here is that when reconstruct_complex_type is reconstructing
a reference type, it just builds a pointer type which is incorrect.  And
this causes using the vector_size attribute on references to become
pointers.  This patch fixes the problem by splitting the two cases of
POINTER_TYPE_P into their own code.  Also this changes so that we rebuild
the pointer/reference with the same mode as the old one and the
pointer/reference which could have cause issues for ia64-hpux and s390x.

OK?  Bootstrapped and tested on powerpc64-linux-gnu with no regressions,
also built and tested for spu-elf with no regressions.

This is ok. (I suppose this is not a regression, right?)


Thanks,
Richard.

Note to the people who are doing the rvalue references, you should check
how rvalue references interact with vector types.

Thanks,
Andrew Pinski

ChangeLog:
        * tree.c (reconstruct_complex_type): Reconstruct a reference
correctly.
        Also use the same mode for the pointer as the old pointer type.

* g++.dg/ext/vector7.C: New testcase.





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