aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-05-31 21:14:52 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-05-31 21:14:52 +0000
commitac816b0280b8344aef4955f1cea092f6b2401edd (patch)
treeba6f9b09f627fba0cd7cb0cca6ba17e1db74915d /gcc/fortran/trans-expr.c
parentac5753b796593af16f52cdab931d1768875e5ea8 (diff)
downloadgcc-ac816b0280b8344aef4955f1cea092f6b2401edd.zip
gcc-ac816b0280b8344aef4955f1cea092f6b2401edd.tar.gz
gcc-ac816b0280b8344aef4955f1cea092f6b2401edd.tar.bz2
trans-expr.c (gfc_conv_expr_op): Use zero constant that matches the lse type.
2007-05-31 Richard Guenther <rguenther@suse.de> * trans-expr.c (gfc_conv_expr_op): Use zero constant that matches the lse type. (gfc_trans_string_copy): Use sizetype zero constant. * intrinsic.c (add_functions): The sizeof intrinsic has index type result. * trans-types.c (gfc_get_dtype): Convert size to index type before shifting. * trans-array.c (gfc_trans_array_constructor_value): Use index type for offset computation. * trans-intrinsic.c (gfc_conv_associated): Use correct type for zero constant. From-SVN: r125242
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index c3981d7..407098e 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -1149,7 +1149,7 @@ gfc_conv_expr_op (gfc_se * se, gfc_expr * expr)
lse.expr = gfc_build_compare_string (lse.string_length, lse.expr,
rse.string_length, rse.expr);
- rse.expr = integer_zero_node;
+ rse.expr = build_int_cst (TREE_TYPE (lse.expr), 0);
gfc_add_block_to_block (&lse.post, &rse.post);
}
@@ -2537,7 +2537,7 @@ gfc_trans_string_copy (stmtblock_t * block, tree dlength, tree dest,
/* Do nothing if the destination length is zero. */
cond = fold_build2 (GT_EXPR, boolean_type_node, dlen,
- build_int_cst (gfc_charlen_type_node, 0));
+ build_int_cst (size_type_node, 0));
/* The following code was previously in _gfortran_copy_string: