public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/59107] [4.7/4.8/4.9 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
Date: Sun, 17 Nov 2013 19:01:00 -0000	[thread overview]
Message-ID: <bug-59107-4-8xdLqnnLuA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59107-4@http.gcc.gnu.org/bugzilla/>

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |janus at gcc dot gnu.org

--- Comment #8 from janus at gcc dot gnu.org ---
The following patch fixes it (and regtests cleanly):


Index: gcc/fortran/gfortran.h
===================================================================
--- gcc/fortran/gfortran.h    (revision 204922)
+++ gcc/fortran/gfortran.h    (working copy)
@@ -1250,7 +1250,7 @@ typedef struct gfc_symbol
   /* Set if this variable is used as an index name in a FORALL.  */
   unsigned forall_index:1;
   /* Used to avoid multiple resolutions of a single symbol.  */
-  unsigned resolved:1;
+  unsigned resolved:2;

   int refs;
   struct gfc_namespace *ns;    /* namespace containing this symbol */
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c    (revision 204922)
+++ gcc/fortran/resolve.c    (working copy)
@@ -1619,8 +1619,9 @@ gfc_resolve_intrinsic (gfc_symbol *sym, locus *loc
   gfc_intrinsic_sym* isym = NULL;
   const char* symstd;

-  if (sym->formal)
+  if (sym->resolved>=2)
     return true;
+  sym->resolved = 2;

   /* Already resolved.  */
   if (sym->from_intmod && sym->ts.type != BT_UNKNOWN)
@@ -12699,7 +12700,7 @@ resolve_symbol (gfc_symbol *sym)
   gfc_array_spec *as;
   bool saved_specification_expr;

-  if (sym->resolved)
+  if (sym->resolved>=1)
     return;
   sym->resolved = 1;


  parent reply	other threads:[~2013-11-17 19:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13  9:33 [Bug fortran/59107] New: " mathewc at nag dot co.uk
2013-11-17 15:14 ` [Bug fortran/59107] " janus at gcc dot gnu.org
2013-11-17 15:30 ` janus at gcc dot gnu.org
2013-11-17 15:39 ` janus at gcc dot gnu.org
2013-11-17 15:51 ` janus at gcc dot gnu.org
2013-11-17 15:58 ` janus at gcc dot gnu.org
2013-11-17 16:02 ` janus at gcc dot gnu.org
2013-11-17 16:18 ` [Bug fortran/59107] [4.7/4.8/4.9 Regression] " janus at gcc dot gnu.org
2013-11-17 19:01 ` janus at gcc dot gnu.org [this message]
2013-11-19  9:50 ` rguenth at gcc dot gnu.org
2014-06-12 13:49 ` [Bug fortran/59107] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:34 ` [Bug fortran/59107] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-01-22 14:27 ` dominiq at lps dot ens.fr
2015-03-21 15:27 ` dominiq at lps dot ens.fr
2015-06-23  8:27 ` [Bug fortran/59107] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:02 ` [Bug fortran/59107] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:32 ` jakub at gcc dot gnu.org
2020-05-11  8:27 ` [Bug fortran/59107] [8/9/10/11 " cvs-commit at gcc dot gnu.org
2020-05-11  9:45 ` cvs-commit at gcc dot gnu.org
2020-05-11 11:38 ` cvs-commit at gcc dot gnu.org
2020-05-11 14:11 ` cvs-commit at gcc dot gnu.org
2020-05-11 14:12 ` markeggleston at gcc dot gnu.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=bug-59107-4-8xdLqnnLuA@http.gcc.gnu.org/bugzilla/ \
    --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).