From 0f8bc3e1736a1b5b8195f0cb968511ca36a17c19 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Sun, 29 Oct 2006 18:05:37 +0100 Subject: 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 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/trans-intrinsic.c | 8 +++----- 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 + + * trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a + signed integer node. + 2006-10-29 Jerry DeLisle 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; } -- cgit v1.1