diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-05-05 07:23:00 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-05-05 07:23:00 +0000 |
commit | cc27e657d36005a8b1672f2ee60a5ad779a0d804 (patch) | |
tree | e6579b9ad0769f3b795f008e3c607e1affce3794 /gcc/cp/call.c | |
parent | d70bd7fff0dc91c22ce7e118b90dc91bfa1e935a (diff) | |
download | gcc-cc27e657d36005a8b1672f2ee60a5ad779a0d804.zip gcc-cc27e657d36005a8b1672f2ee60a5ad779a0d804.tar.gz gcc-cc27e657d36005a8b1672f2ee60a5ad779a0d804.tar.bz2 |
re PR target/14899 (wrong code due to change in compatibility rules for vector types)
gcc/ChangeLog:
2004-05-04 Paolo Bonzini <bonzini@gnu.org>
Richard Henderson <rth@redhat.com>
PR target/14899
* c-common.c (vector_types_convertible_p): New function.
* c-typeck.c (comptypes): Recurse on vector types.
(convert_for_assignment): Use vector_types_convertible_p.
(digest_init): Use vector_types_convertible_p to check
validness of constant vector initializers; otherwise treat
them as scalars.
* tree.c (make_or_reuse_type): New.
(build_common_tree_nodes): Use it.
* cp/call.c (standard_conversion): Likewise.
* cp/typeck.c (comptypes): Recurse on vector types.
(convert_for_assignment): Use vector_types_convertible_p.
* config/rs6000/rs6000.c (build_opaque_vector_type):
New function.
(rs6000_init_builtins): Use it.
gcc/testsuite/ChangeLog:
2004-05-04 Paolo Bonzini <bonzini@gnu.org>
* g++.dg/ext/spe1.C: New testcase.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r81504
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 56e089d..4f38c7e 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -660,8 +660,7 @@ standard_conversion (tree to, tree from, tree expr) else if (tcode == POINTER_TYPE && fcode == POINTER_TYPE && TREE_CODE (TREE_TYPE (to)) == VECTOR_TYPE && TREE_CODE (TREE_TYPE (from)) == VECTOR_TYPE - && ((*targetm.vector_opaque_p) (TREE_TYPE (to)) - || (*targetm.vector_opaque_p) (TREE_TYPE (from)))) + && vector_types_convertible_p (TREE_TYPE (to), TREE_TYPE (from))) conv = build_conv (ck_std, to, conv); else if ((tcode == INTEGER_TYPE && fcode == POINTER_TYPE) || (tcode == POINTER_TYPE && fcode == INTEGER_TYPE)) @@ -820,8 +819,7 @@ standard_conversion (tree to, tree from, tree expr) conv->rank = cr_promotion; } else if (fcode == VECTOR_TYPE && tcode == VECTOR_TYPE - && ((*targetm.vector_opaque_p) (from) - || (*targetm.vector_opaque_p) (to))) + && vector_types_convertible_p (from, to)) return build_conv (ck_std, to, conv); else if (IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from) && is_properly_derived_from (from, to)) |