diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2007-03-14 14:31:09 +0100 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-03-14 13:31:09 +0000 |
commit | 19ee20654bba5b0a516043366f26730db6738643 (patch) | |
tree | be951ee1c126585609d28e42f8a474143527bfa8 /gcc | |
parent | 28c3de64878cd96057a68625461f05fa796e8c0f (diff) | |
download | gcc-19ee20654bba5b0a516043366f26730db6738643.zip gcc-19ee20654bba5b0a516043366f26730db6738643.tar.gz gcc-19ee20654bba5b0a516043366f26730db6738643.tar.bz2 |
trans-array.c (gfc_trans_auto_array_allocation): Replace fold(convert()) by fold_convert().
* trans-array.c (gfc_trans_auto_array_allocation): Replace
fold(convert()) by fold_convert().
(gfc_duplicate_allocatable): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
build_int_cst instead of converting an integer_zero_node
to the final type.
From-SVN: r122921
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/trans-array.c | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 832f62c..48d4334 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + * trans-array.c (gfc_trans_auto_array_allocation): Replace + fold(convert()) by fold_convert(). + (gfc_duplicate_allocatable): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use + build_int_cst instead of converting an integer_zero_node + to the final type. + 2007-03-14 Jakub Jelinek <jakub@redhat.com> * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER. diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index c7e9da1..5d41331 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -3862,7 +3862,7 @@ gfc_trans_auto_array_allocation (tree decl, gfc_symbol * sym, tree fnbody) else gcc_unreachable (); tmp = build_call_expr (fndecl, 1, size); - tmp = fold (convert (TREE_TYPE (decl), tmp)); + tmp = fold_convert (TREE_TYPE (decl), tmp); gfc_add_modify_expr (&block, decl, tmp); /* Set offset of the array. */ @@ -4918,8 +4918,7 @@ gfc_duplicate_allocatable(tree dest, tree src, tree type, int rank) tmp = build_call_expr (gfor_fndecl_internal_malloc64, 1, size); else gcc_unreachable (); - tmp = fold (convert (TREE_TYPE (gfc_conv_descriptor_data_get (src)), - tmp)); + tmp = fold_convert (TREE_TYPE (gfc_conv_descriptor_data_get (src)), tmp); gfc_conv_descriptor_data_set (&block, dest, tmp); /* We know the temporary and the value will be the same length, diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 6c08004..58c4131 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -1840,7 +1840,7 @@ gfc_conv_intrinsic_dot_product (gfc_se * se, gfc_expr * expr) /* Initialize the result. */ resvar = gfc_create_var (type, "val"); if (expr->ts.type == BT_LOGICAL) - tmp = convert (type, integer_zero_node); + tmp = build_int_cst (type, 0); else tmp = gfc_build_const (type, integer_zero_node); |