diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-04-24 18:29:40 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-04-24 18:29:40 +0200 |
commit | 5dc1195440bf20453b2d98bfd3c3bf92a42c759e (patch) | |
tree | 2b27f4fd6f66ac33d3f929db98431f16e8e12dd9 /gcc/langhooks.h | |
parent | 6f88c6630defca9ff60cc1383837a4dfd4c1b317 (diff) | |
download | gcc-5dc1195440bf20453b2d98bfd3c3bf92a42c759e.zip gcc-5dc1195440bf20453b2d98bfd3c3bf92a42c759e.tar.gz gcc-5dc1195440bf20453b2d98bfd3c3bf92a42c759e.tar.bz2 |
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
Diffstat (limited to 'gcc/langhooks.h')
-rw-r--r-- | gcc/langhooks.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h index b693742..6a54b01 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -130,6 +130,12 @@ struct lang_hooks_for_types for the debugger about the array bounds, strides, etc. */ bool (*get_array_descr_info) (const_tree, struct array_descr_info *); + /* If we requested a pointer to a vector, build up the pointers that + we stripped off while looking for the inner type. Similarly for + return values from functions. The argument TYPE is the top of the + chain, and BOTTOM is the new type which we will point to. */ + tree (*reconstruct_complex_type) (tree, tree); + /* Nonzero if types that are identical are to be hashed so that only one copy is kept. If a language requires unique types for each user-specified type, such as Ada, this should be set to TRUE. */ |