public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX Coudert <fxcoudert@gmail.com>
To: Fortran List <fortran@gcc.gnu.org>,
	 gcc-patches list <gcc-patches@gcc.gnu.org>
Subject: [gfortran,committed] Fix last bits of EXIT intrinsic
Date: Mon, 06 Aug 2007 22:29:00 -0000	[thread overview]
Message-ID: <ABAB6767-9A5A-42CA-BD73-003BEEB6A5C4@gmail.com> (raw)

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);
}

             reply	other threads:[~2007-08-06 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 22:29 FX Coudert [this message]
2007-08-06 23:08 ` FX Coudert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ABAB6767-9A5A-42CA-BD73-003BEEB6A5C4@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).