From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25124 invoked by alias); 6 Aug 2007 22:29:49 -0000 Received: (qmail 24867 invoked by uid 22791); 6 Aug 2007 22:29:47 -0000 X-Spam-Check-By: sourceware.org Received: from mu-out-0910.google.com (HELO mu-out-0910.google.com) (209.85.134.191) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 22:29:43 +0000 Received: by mu-out-0910.google.com with SMTP id w9so1652371mue for ; Mon, 06 Aug 2007 15:29:39 -0700 (PDT) Received: by 10.86.28.5 with SMTP id b5mr4694709fgb.1186439379560; Mon, 06 Aug 2007 15:29:39 -0700 (PDT) Received: from ?144.82.208.57? ( [144.82.208.57]) by mx.google.com with ESMTPS id g17sm6538036nfd.2007.08.06.15.29.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2007 15:29:39 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Fortran List , gcc-patches list From: FX Coudert Subject: [gfortran,committed] Fix last bits of EXIT intrinsic Date: Mon, 06 Aug 2007 22:29:00 -0000 X-Mailer: Apple Mail (2.752.3) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00399.txt.bz2 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 + + PR fortran/30933 + * iresolve.c (gfc_resolve_exit): Convert argument to default + integer kind. + 2007-08-06 Daniel Franke * 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); }