summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-intrinsic.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-20 15:21:12 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-20 15:21:12 +0000
commit4b6af10a80e6d3b01a47473446f24f937124dfcc (patch)
treead2c3fa4066a22840aa2736f513ba2996f8a41fd /gcc/fortran/trans-intrinsic.c
parent14d77f5839da7f48e5fdd401bec5233a4d39b558 (diff)
downloadgcc-4b6af10a80e6d3b01a47473446f24f937124dfcc.tar.gz
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use
gfc_index_one_node. (gfc_conv_intrinsic_size): Use gfc_index_{zero,one}_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142046 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-intrinsic.c')
-rw-r--r--gcc/fortran/trans-intrinsic.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 22e30ab375d..629ec0afb03 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -2209,7 +2209,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
gfc_index_one_node, loop.from[0]);
else
- tmp = build_int_cst (gfc_array_index_type, 1);
+ tmp = gfc_index_one_node;
gfc_add_modify (&block, offset, tmp);
@@ -3422,14 +3422,13 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr)
else
{
se->expr = NULL_TREE;
- argse.expr = fold_build2 (MINUS_EXPR,
- gfc_array_index_type, argse.expr,
- build_int_cst (gfc_array_index_type, 1));
+ argse.expr = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ argse.expr, gfc_index_one_node);
}
}
else if (expr->value.function.actual->expr->rank == 1)
{
- argse.expr = build_int_cst (gfc_array_index_type, 0);
+ argse.expr = gfc_index_zero_node;
se->expr = NULL_TREE;
}
else
@@ -3445,9 +3444,9 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr)
se->expr = fold_build2 (MINUS_EXPR, gfc_array_index_type,
ubound, lbound);
se->expr = fold_build2 (PLUS_EXPR, gfc_array_index_type, se->expr,
- build_int_cst (gfc_array_index_type, 1));
+ gfc_index_one_node);
se->expr = fold_build2 (MAX_EXPR, gfc_array_index_type, se->expr,
- build_int_cst (gfc_array_index_type, 0));
+ gfc_index_zero_node);
}
type = gfc_typenode_for_spec (&expr->ts);