re PR c++/35758 (vector_size attribute lost in function arguments for templates)
authorJakub Jelinek <jakub@redhat.com>
Thu, 24 Apr 2008 16:29:40 +0000 (18:29 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 24 Apr 2008 16:29:40 +0000 (18:29 +0200)
commit5dc1195440bf20453b2d98bfd3c3bf92a42c759e
tree2b27f4fd6f66ac33d3f929db98431f16e8e12dd9
parent6f88c6630defca9ff60cc1383837a4dfd4c1b317
re PR c++/35758 (vector_size attribute lost in function arguments for templates)

PR c++/35758
* c-common.c (handle_vector_size_attribute): Call
lang_hooks.types.reconstruct_complex_type instead of
reconstruct_complex_type.
* config/rs6000/rs6000.c (rs6000_handle_altivec_attribute): Likewise.
* config/spu/spu.c (spu_handle_vector_attribute): Likewise.
* langhooks.h (struct lang_hooks_for_types): Add
reconstruct_complex_type hook.
* langhooks-def.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it.

* cp-tree.h (cp_reconstruct_complex_type): New prototype.
* cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
* decl2.c (is_late_template_attribute): Only make vector_size
late tmpl attribute if argument is type or value dependent.
(cp_reconstruct_complex_type): New function.

* g++.dg/ext/vector14.C: New test.

From-SVN: r134639
12 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/config/rs6000/rs6000.c
gcc/config/spu/spu.c
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/langhooks-def.h
gcc/langhooks.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/vector14.C [new file with mode: 0644]