summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-stmt.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-11 09:19:58 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-11 09:19:58 +0000
commitcd77215e3f76bac99cfd22301dca183f7fff5f93 (patch)
tree135b81edc2c41479047f35a304f0d3cb961a06dc /gcc/fortran/trans-stmt.c
parent416c300e6c2412fbade315ddbe0a0c5ccff60e06 (diff)
downloadgcc-cd77215e3f76bac99cfd22301dca183f7fff5f93.tar.gz
2007-07-11 Richard Guenther <rguenther@suse.de>
* trans-array.c (gfc_conv_array_parameter): Use correct types for comparison. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use correct types for POINTER_PLUS_EXPR. * trans-stmt.c (gfc_trans_forall_loop): Use correct type for integer one constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126543 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r--gcc/fortran/trans-stmt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index abb53ef7515..034a50529eb 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -1609,7 +1609,8 @@ gfc_trans_forall_loop (forall_info *forall_tmp, tree body,
}
/* Decrement the loop counter. */
- tmp = build2 (MINUS_EXPR, TREE_TYPE (var), count, gfc_index_one_node);
+ tmp = build2 (MINUS_EXPR, TREE_TYPE (var), count,
+ build_int_cst (TREE_TYPE (var), 1));
gfc_add_modify_expr (&block, count, tmp);
body = gfc_finish_block (&block);
@@ -3609,7 +3610,8 @@ gfc_trans_allocate (gfc_code * code)
tmp = se.string_length;
tmp = build_call_expr (gfor_fndecl_allocate, 2, tmp, pstat);
- tmp = build2 (MODIFY_EXPR, void_type_node, se.expr, tmp);
+ tmp = build2 (MODIFY_EXPR, void_type_node, se.expr,
+ fold_convert (TREE_TYPE (se.expr), tmp));
gfc_add_expr_to_block (&se.pre, tmp);
if (code->expr)