aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-12-08 13:17:18 -0800
committerRichard Henderson <rth@gcc.gnu.org>2004-12-08 13:17:18 -0800
commit323c74dacc07833f98c5f289b4146ecdab63496a (patch)
tree4fb96003b004905eebacb01b94b3de90448d7d5f /gcc/fortran/intrinsic.c
parent1b227ee01aa9462531fdb1dc3d95e0d674f9c16a (diff)
downloadgcc-323c74dacc07833f98c5f289b4146ecdab63496a.zip
gcc-323c74dacc07833f98c5f289b4146ecdab63496a.tar.gz
gcc-323c74dacc07833f98c5f289b4146ecdab63496a.tar.bz2
intrinsic.c (gfc_convert_type_warn): Propagate the input shape to the output expression.
* intrinsic.c (gfc_convert_type_warn): Propagate the input shape to the output expression. * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress warning conversion. (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters to index kind. From-SVN: r91917
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r--gcc/fortran/intrinsic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index ebf40ce..a079e86 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -3014,6 +3014,7 @@ gfc_convert_type_warn (gfc_expr * expr, gfc_typespec * ts, int eflag,
locus old_where;
gfc_expr *new;
int rank;
+ mpz_t *shape;
from_ts = expr->ts; /* expr->ts gets clobbered */
@@ -3050,6 +3051,8 @@ gfc_convert_type_warn (gfc_expr * expr, gfc_typespec * ts, int eflag,
/* Insert a pre-resolved function call to the right function. */
old_where = expr->where;
rank = expr->rank;
+ shape = expr->shape;
+
new = gfc_get_expr ();
*new = *expr;
@@ -3058,6 +3061,7 @@ gfc_convert_type_warn (gfc_expr * expr, gfc_typespec * ts, int eflag,
new->value.function.isym = sym;
new->where = old_where;
new->rank = rank;
+ new->shape = gfc_copy_shape (shape, rank);
*expr = *new;