+2004-12-08 Richard Henderson <rth@redhat.com>
+
+ * 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.
+
2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/18826
gfc_resolve_index (dim, 1);
/* Convert dim to shift's kind, so we don't need so many variations. */
if (dim->ts.kind != shift->ts.kind)
- gfc_convert_type (dim, &shift->ts, 2);
+ gfc_convert_type_warn (dim, &shift->ts, 2, 0);
}
f->value.function.name =
gfc_get_string ("__cshift%d_%d", n, shift->ts.kind);
/* Convert dim to the same type as shift, so we don't need quite so many
variations. */
if (dim != NULL && dim->ts.kind != shift->ts.kind)
- gfc_convert_type (dim, &shift->ts, 2);
+ gfc_convert_type_warn (dim, &shift->ts, 2, 0);
f->value.function.name =
gfc_get_string ("__eoshift%d_%d", n, shift->ts.kind);
c = c->next;
}
}
+
+ /* Force-convert both SHAPE and ORDER to index_kind so that we don't need
+ so many runtime variations. */
+ if (shape->ts.kind != gfc_index_integer_kind)
+ {
+ gfc_typespec ts = shape->ts;
+ ts.kind = gfc_index_integer_kind;
+ gfc_convert_type_warn (shape, &ts, 2, 0);
+ }
+ if (order && order->ts.kind != gfc_index_integer_kind)
+ gfc_convert_type_warn (order, &shape->ts, 2, 0);
}