public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/31222] Rejected: implicitly-typed dummys used in initialization expressions
Date: Thu, 29 Mar 2007 23:34:00 -0000	[thread overview]
Message-ID: <20070329233440.19992.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31222-13404@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from pault at gcc dot gnu dot org  2007-03-30 00:34 -------
This fixes it and regtests OK

Paul

Index: gcc/fortran/check.c
===================================================================
*** gcc/fortran/check.c (revision 123183)
--- gcc/fortran/check.c (working copy)
*************** numeric_check (gfc_expr *e, int n)
*** 58,63 ****
--- 58,75 ----
    if (gfc_numeric_ts (&e->ts))
      return SUCCESS;

+   /* If the expression has not got a type, check if its namespace can
+      offer a default type.  */
+   if ((e->expr_type == EXPR_VARIABLE || e->expr_type == EXPR_VARIABLE)
+         && e->symtree->n.sym->ts.type == BT_UNKNOWN
+         && gfc_set_default_type (e->symtree->n.sym, 0,
+                                  e->symtree->n.sym->ns) == SUCCESS
+         && gfc_numeric_ts (&e->symtree->n.sym->ts))
+     {
+       e->ts = e->symtree->n.sym->ts;
+       return SUCCESS;
+     }
+
    gfc_error ("'%s' argument of '%s' intrinsic at %L must be a numeric type",
             gfc_current_intrinsic_arg[n], gfc_current_intrinsic, &e->where);


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-03-16 15:06:50         |2007-03-30 00:34:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31222


  parent reply	other threads:[~2007-03-29 23:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16 12:42 [Bug fortran/31222] New: " burnus at gcc dot gnu dot org
2007-03-16 15:05 ` [Bug fortran/31222] " fxcoudert at gcc dot gnu dot org
2007-03-16 15:07 ` fxcoudert at gcc dot gnu dot org
2007-03-29 23:34 ` pault at gcc dot gnu dot org [this message]
2007-04-05 21:00 ` pault at gcc dot gnu dot org
2007-04-07 20:21 ` pault at gcc dot gnu dot org
2007-04-07 20:32 ` pault at gcc dot gnu dot org

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=20070329233440.19992.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).