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.
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.