aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2006-10-29 18:05:37 +0100
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2006-10-29 17:05:37 +0000
commit0f8bc3e1736a1b5b8195f0cb968511ca36a17c19 (patch)
tree599d5d0f82a07ea4686d007f7b116331c4a3e0c8
parent2c693a24a05776bfdc330219fdd0d91896a5b412 (diff)
downloadgcc-0f8bc3e1736a1b5b8195f0cb968511ca36a17c19.zip
gcc-0f8bc3e1736a1b5b8195f0cb968511ca36a17c19.tar.gz
gcc-0f8bc3e1736a1b5b8195f0cb968511ca36a17c19.tar.bz2
trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a signed integer node.
* trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a signed integer node. From-SVN: r118151
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-intrinsic.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e32f841..b015e78 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a
+ signed integer node.
+
2006-10-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/17741
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 7dbd60e..911782b 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -3301,7 +3301,7 @@ gfc_conv_intrinsic_iargc (gfc_se * se, gfc_expr * expr)
gfc_index_integer_kind integer. */
static void
-gfc_conv_intrinsic_loc(gfc_se * se, gfc_expr * expr)
+gfc_conv_intrinsic_loc (gfc_se * se, gfc_expr * expr)
{
tree temp_var;
gfc_expr *arg_expr;
@@ -3315,13 +3315,11 @@ gfc_conv_intrinsic_loc(gfc_se * se, gfc_expr * expr)
gfc_conv_expr_reference (se, arg_expr);
else
gfc_conv_array_parameter (se, arg_expr, ss, 1);
- se->expr= convert (gfc_unsigned_type (long_integer_type_node),
- se->expr);
+ se->expr= convert (gfc_get_int_type (gfc_index_integer_kind), se->expr);
/* Create a temporary variable for loc return value. Without this,
we get an error an ICE in gcc/expr.c(expand_expr_addr_expr_1). */
- temp_var = gfc_create_var (gfc_unsigned_type (long_integer_type_node),
- NULL);
+ temp_var = gfc_create_var (gfc_get_int_type (gfc_index_integer_kind), NULL);
gfc_add_modify_expr (&se->pre, temp_var, se->expr);
se->expr = temp_var;
}