aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-08-25 15:47:43 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-08-25 15:47:43 +0000
commit43dc123f52541ec779e4b56541203cec16c18d80 (patch)
treec70318c3104fdbdeeae37e278eef3a2220c321b4 /gcc/c-common.c
parenta30b6839178e57250791bd821f332151afaffba5 (diff)
downloadgcc-43dc123f52541ec779e4b56541203cec16c18d80.zip
gcc-43dc123f52541ec779e4b56541203cec16c18d80.tar.gz
gcc-43dc123f52541ec779e4b56541203cec16c18d80.tar.bz2
re PR target/8795 ([PPC] Altivec related bugs concerning gcc 3.3 and mainline)
PR c++/8795 * tree.h (build_method_type_directly): Declare. * c-common.c (handle_vector_size_attributes): Handle METHOD_TYPEs. (vector_size_helper): Likewise. * tree.c (build_method_type_directly): New function. (build_method_type): Use it. PR c++/8795 * cp-tree.h (build_cplus_method_type): Remove. * call.c (standard_conversion): Use build_method_type_directly instead of build_cplus_method_type. * class.c (build_clone): Likewise. (adjust_clone_args): Likewise. * decl.c (build_ptrmem_type): Likewise. (grokdeclarator): Likewise. (check_function_type): Likewise. * decl2.c (grok_method_quals): Likewise. (maybe_retrofit_in_chrg): Likewise. * pt.c (copy_default_args_to_explicit_spec): Likewise. (tsubst_function_type): Likewise. (tsubst): Likewise. * tree.c (build_cplus_method_type): Remove. * typeck.c (merge_types): Use build_method_type_directly. PR c++/8795 * g++.dg/ext/altivec-1.C: New test. From-SVN: r70773
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 3089e5d..b4151fa 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -5086,6 +5086,7 @@ handle_vector_size_attribute (tree *node, tree name, tree args,
while (POINTER_TYPE_P (type)
|| TREE_CODE (type) == FUNCTION_TYPE
+ || TREE_CODE (type) == METHOD_TYPE
|| TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type);
@@ -5216,12 +5217,19 @@ vector_size_helper (tree type, tree bottom)
else if (TREE_CODE (type) == ARRAY_TYPE)
{
inner = vector_size_helper (TREE_TYPE (type), bottom);
- outer = build_array_type (inner, TYPE_VALUES (type));
+ outer = build_array_type (inner, TYPE_DOMAIN (type));
}
else if (TREE_CODE (type) == FUNCTION_TYPE)
{
inner = vector_size_helper (TREE_TYPE (type), bottom);
- outer = build_function_type (inner, TYPE_VALUES (type));
+ outer = build_function_type (inner, TYPE_ARG_TYPES (type));
+ }
+ else if (TREE_CODE (type) == METHOD_TYPE)
+ {
+ inner = vector_size_helper (TREE_TYPE (type), bottom);
+ outer = build_method_type_directly (TYPE_METHOD_BASETYPE (type),
+ inner,
+ TYPE_ARG_TYPES (type));
}
else
return bottom;