diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-21 08:57:07 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-21 08:57:07 +0000 |
commit | 4418a1d495f31d810225ef99108c2de08daf6afb (patch) | |
tree | 04000c5f2ebc9c61790505ccc698906864ba8de9 /gcc/convert.c | |
parent | 6ca10ffb30e14afa429439f2f5a9ea16a86da78c (diff) | |
download | gcc-4418a1d495f31d810225ef99108c2de08daf6afb.tar.gz |
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (vector_types_convertible_p): Use vector types'
TYPE_SIZE and TREE_TYPE instead of their mode.
* convert.c (convert_to_integer): Likewise.
(convert_to_vector): Likewise.
* fold-const.c (fold_convert): Likewise.
* varasm.c (output_constant): Likewise.
* expr.c (store_constructor): Split ARRAY_TYPE and VECTOR_TYPE.
Allow a VECTOR_TYPE initializer to be made of several vectors.
For ARRAY_TYPEs and VECTOR_TYPES, simplify a bit the handling
of cleared and need_to_clear, and use fold_convert.
* c-typeck.c (build_binary_op): Do not use RDIV_EXPR for
integer vectors.
cp/ChangeLog:
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* c-typeck.c (build_binary_op): Do not use RDIV_EXPR for
integer vectors.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r-- | gcc/convert.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/convert.c b/gcc/convert.c index 5441bf173f4..9e89163e1b1 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -677,8 +677,7 @@ convert_to_integer (tree type, tree expr) TREE_TYPE (TREE_TYPE (expr)), expr))); case VECTOR_TYPE: - if (GET_MODE_SIZE (TYPE_MODE (type)) - != GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (expr)))) + if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr)))) { error ("can't convert between vector values of different size"); return error_mark_node; @@ -755,8 +754,7 @@ convert_to_vector (tree type, tree expr) { case INTEGER_TYPE: case VECTOR_TYPE: - if (GET_MODE_SIZE (TYPE_MODE (type)) - != GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (expr)))) + if (!tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (expr)))) { error ("can't convert between vector values of different size"); return error_mark_node; |