This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran,committed] Fix last bits of EXIT intrinsic
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches list <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 6 Aug 2007 23:29:34 +0100
- Subject: [gfortran,committed] Fix last bits of EXIT intrinsic
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=JNk8/PDIPIh7E9Z8b1scFar9p6DIfB2lqxQWhb3kX+3xnFTURFi71NgPcp4KKY7Yk0iaWP5tWjd2S4zYIjGhdZrQvQFFVbnT9oTiZCCDZEJnJhNtnbmLi3JqwlIbXyI+NH1JyyGa5SOYa+dMqriibhlw4M3X1gRYlcOJddicBHg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=PUOl+xRKZ+v4IFJo5hRjoo/CIzbIk89pjBEtrQvTWbyg065HFvrbUaYOfpGEDvTpZqzQEEO6TxhkT6qVM9/2XM49+bm11KI6d+NDSTahjFMT/qjk9pxHkfPl3R8Hp9juK5piUdX65SrD0j3UoBq73mjlrZ5++I7KKe0xooDMkJM=
Committed as rev. 127256 to clear up PR30933.
FX
Index: ChangeLog
===================================================================
--- ChangeLog (revision 127255)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/30933
+ * iresolve.c (gfc_resolve_exit): Convert argument to default
+ integer kind.
+
2007-08-06 Daniel Franke <franke.daniel@gmail.com>
* resolve.c (derived_pointer): Removed, replaced callers by
access
Index: iresolve.c
===================================================================
--- iresolve.c (revision 127255)
+++ iresolve.c (working copy)
@@ -2739,14 +2739,18 @@ void
gfc_resolve_exit (gfc_code *c)
{
const char *name;
- int kind;
+ gfc_typespec ts;
+ gfc_expr *n;
- if (c->ext.actual->expr != NULL)
- kind = c->ext.actual->expr->ts.kind;
- else
- kind = gfc_default_integer_kind;
+ /* The STATUS argument has to be of default kind. If it is not,
+ we convert it. */
+ ts.type = BT_INTEGER;
+ ts.kind = gfc_default_integer_kind;
+ n = c->ext.actual->expr;
+ if (n != NULL && n->ts.kind != ts.kind)
+ gfc_convert_type (n, &ts, 2);
- name = gfc_get_string (PREFIX ("exit_i%d"), kind);
+ name = gfc_get_string (PREFIX ("exit_i%d"), ts.kind);
c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
}