public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
@ 2013-11-13  9:33 mathewc at nag dot co.uk
  2013-11-17 15:14 ` [Bug fortran/59107] " janus at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: mathewc at nag dot co.uk @ 2013-11-13  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59107
           Summary: Spurious "Type specified for intrinsic function
                    'command_argument_count' at (1) is ignored" under
                    -Wsurprising.
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mathewc at nag dot co.uk

> cat test.f90
Program p
  Integer :: nargs
  Intrinsic :: command_argument_count
  nargs = command_argument_count()
End
> gfortran --version
GNU Fortran (GCC) 4.8.2 20131017 (Red Hat 4.8.2-1)
> gfortran -Wsurprising test.f90
test.f90:3.37:

  Intrinsic :: command_argument_count
                                     1
Warning: Type specified for intrinsic function 'command_argument_count' at (1)
is ignored


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
@ 2013-11-17 15:14 ` janus at gcc dot gnu.org
  2013-11-17 15:30 ` janus at gcc dot gnu.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-17
                 CC|                            |janus at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org ---
Confirmed with 4.7, 4.8 and trunk.

Apparently the symbol gets a ts.type of BT_INTEGER somewhere (indepedent of the
type of 'nargs'). It also happens for the following variant:

  implicit none
  Intrinsic :: command_argument_count
  print *, command_argument_count()
End

Doing the same thing with a different intrinsic like 'cos' does not give the
warning:

  Intrinsic :: cos
  print *, cos(0.)
End


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising 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
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 15:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to janus from comment #1)
> Doing the same thing with a different intrinsic like 'cos' does not give the
> warning:
> 
>   Intrinsic :: cos
>   print *, cos(0.)
> End

However, it *does* so with GETGID, for example:

intrinsic :: getgid
print *, getgid()
end

GETGID is a GNU extension, in contrast to COMMAND_ARGUMENT_COUNT (which is
standard F03), but both are integer-valued functions without arguments.

The warning only appears with the INTRINSIC statement.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising 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
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from janus at gcc dot gnu.org ---
The warning also occurs with 4.5 and 4.6.

Further, it not only occurs for integer functions, but also for
character-valued ones, like FDATE (which, like the previous two, has no
arguments).


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (2 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from janus at gcc dot gnu.org ---
In fact the warning seems to happen for all intrinsics which are introduced by
'add_sym_0' in intrinsic.c (all those are functions without arguments), except
those from ISO_FORTRAN_ENV, since they are imported by a USE statement instead
of INTRINSIC.

For the intrinsics with arguments it does not seem to happen.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (3 preceding siblings ...)
  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
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to janus from comment #4)
> For the intrinsics with arguments it does not seem to happen.

This is simply due to the fact that 'gfc_resolve_intrinsic' apparently is
called more than once (potentially for all intrinsics?).

However, for the ones with arguments, the check for 'sym->formal' exits the
function early on the second call.

For the ones without arguments this does not happen. They receive a type on the
first call, which then triggers the warning on the second call.

To fix this bug, we just have to make sure that 'gfc_resolve_intrinsic' is not
called more than once!


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (4 preceding siblings ...)
  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
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 16:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from janus at gcc dot gnu.org ---
The warning does not occur with 4.4, i.e. it is a regression in 4.5 and upward.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [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.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (5 preceding siblings ...)
  2013-11-17 16:02 ` janus at gcc dot gnu.org
@ 2013-11-17 16:18 ` janus at gcc dot gnu.org
  2013-11-17 19:01 ` janus at gcc dot gnu.org
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Spurious "Type specified    |[4.7/4.8/4.9 Regression]
                   |for intrinsic function      |Spurious "Type specified
                   |'command_argument_count' at |for intrinsic function
                   |(1) is ignored" under       |'command_argument_count' at
                   |-Wsurprising.               |(1) is ignored" under
                   |                            |-Wsurprising.

--- Comment #7 from janus at gcc dot gnu.org ---
I suspect the culrprit here is myself. The regression is proabably due to this
revision:

http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=150716


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [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.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (6 preceding siblings ...)
  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
  2013-11-19  9:50 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: janus at gcc dot gnu.org @ 2013-11-17 19:01 UTC (permalink / raw)
  To: gcc-bugs

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;


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [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.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (7 preceding siblings ...)
  2013-11-17 19:01 ` janus at gcc dot gnu.org
@ 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
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
   Target Milestone|---                         |4.7.4


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [4.7/4.8/4.9/4.10 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (8 preceding siblings ...)
  2013-11-19  9:50 ` rguenth at gcc dot gnu.org
@ 2014-06-12 13:49 ` 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
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:49 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.4                       |4.8.4

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [4.8/4.9/5 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (9 preceding siblings ...)
  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 ` jakub at gcc dot gnu.org
  2015-01-22 14:27 ` dominiq at lps dot ens.fr
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [4.8/4.9/5 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (10 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-01-22 14:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Updated patch for 5.0

--- ../_clean/gcc/fortran/gfortran.h    2015-01-19 02:01:40.000000000 +0100
+++ gcc/fortran/gfortran.h    2015-01-22 11:42:56.000000000 +0100
@@ -1451,7 +1451,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 resolve_symbol_called:2;

   int refs;
   struct gfc_namespace *ns;    /* namespace containing this symbol */
--- ../_clean/gcc/fortran/resolve.c    2015-01-18 17:58:11.000000000 +0100
+++ gcc/fortran/resolve.c    2015-01-22 11:41:38.000000000 +0100
@@ -1625,8 +1625,9 @@ gfc_resolve_intrinsic (gfc_symbol *sym, 
   gfc_intrinsic_sym* isym = NULL;
   const char* symstd;

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

   /* Already resolved.  */
   if (sym->from_intmod && sym->ts.type != BT_UNKNOWN)
@@ -6930,7 +6931,9 @@ resolve_allocate_expr (gfc_expr *e, gfc_
       goto failure;
     }

-  if (code->ext.alloc.ts.type == BT_CHARACTER && !e->ts.deferred)
+  /* Check F08:C632.  */
+  if (code->ext.alloc.ts.type == BT_CHARACTER && !e->ts.deferred
+      && !UNLIMITED_POLY (e))
     {
       int cmp = gfc_dep_compare_expr (e->ts.u.cl->length,
                       code->ext.alloc.ts.u.cl->length);
@@ -13082,9 +13085,9 @@ resolve_symbol (gfc_symbol *sym)
   gfc_array_spec *as;
   bool saved_specification_expr;

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

   if (sym->attr.artificial)
     return;

It regtest cleanly.

If it helps, I can take this PR.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [4.8/4.9/5 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (11 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-03-21 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
@@ -6930,7 +6931,9 @@ resolve_allocate_expr (gfc_expr *e, gfc_
       goto failure;
     }

-  if (code->ext.alloc.ts.type == BT_CHARACTER && !e->ts.deferred)
+  /* Check F08:C632.  */
+  if (code->ext.alloc.ts.type == BT_CHARACTER && !e->ts.deferred
+      && !UNLIMITED_POLY (e))
     {
       int cmp = gfc_dep_compare_expr (e->ts.u.cl->length,
                       code->ext.alloc.ts.u.cl->length);

in comment 11 is a left over of another patch.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [4.8/4.9/5/6 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (12 preceding siblings ...)
  2015-03-21 15:27 ` dominiq at lps dot ens.fr
@ 2015-06-23  8:27 ` rguenth at gcc dot gnu.org
  2015-06-26 20:02 ` [Bug fortran/59107] [4.9/5/6 " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.5                       |4.9.3

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [4.9/5/6 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (13 preceding siblings ...)
  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 ` jakub at gcc dot gnu.org
  2015-06-26 20:32 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [4.9/5/6 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (14 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:32 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [8/9/10/11 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (15 preceding siblings ...)
  2015-06-26 20:32 ` jakub at gcc dot gnu.org
@ 2020-05-11  8:27 ` cvs-commit at gcc dot gnu.org
  2020-05-11  9:45 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-11  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:dbeaa7ab81a37acadc9af6e7990332604252de20

commit r11-262-gdbeaa7ab81a37acadc9af6e7990332604252de20
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Thu Apr 23 10:33:14 2020 +0100

    Fortran : Spurious warning message with -Wsurprising PR59107

    This change is from a patch developed for gcc-5.  The code
    has moved on since then requiring a change to interface.c

    2020-05-11  Janus Weil  <janus@gcc.gnu.org>
                Dominique d'Humieres  <dominiq@lps.ens.fr>

    gcc/fortran/

            PR fortran/59107
            * gfortran.h: Rename field resolved as resolve_symbol_called
            and assign two 2 bits instead of 1.
            * interface.c (check_dtio_interface1): Use new field name.
            (gfc_find_typebound_dtio_proc): Use new field name.
            * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
            field with resolve_symbol_called is at least 2, if it is not
            set the field to 2.  (resolve_typebound_procedure): Use new field
            name.  (resolve_symbol): Use new field name and check whether it
            is at least 1, if it is not set the field to 1.

    2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/59107
            * gfortran.dg/pr59107.f90: New test.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [8/9/10/11 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (16 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-11  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:2653784e500eccf5d5c2518914b1d9663fe63648

commit r10-8131-g2653784e500eccf5d5c2518914b1d9663fe63648
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Thu Apr 23 10:33:14 2020 +0100

    Fortran : Spurious warning message with -Wsurprising PR59107

    This change is from a patch developed for gcc-5.  The code
    has moved on since then requiring a change to interface.c

    2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

    Backported from mainline
    2020-05-11  Janus Weil  <janus@gcc.gnu.org>
                Dominique d'Humieres  <dominiq@lps.ens.fr>

    gcc/fortran/

            PR fortran/59107
            * gfortran.h: Rename field resolved as resolve_symbol_called
            and assign two 2 bits instead of 1.
            * interface.c (check_dtio_interface1): Use new field name.
            (gfc_find_typebound_dtio_proc): Use new field name.
            * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
            field with resolve_symbol_called is at least 2, if it is not
            set the field to 2.  (resolve_typebound_procedure): Use new field
            name.  (resolve_symbol): Use new field name and check whether it
            is at least 1, if it is not set the field to 1.

    Backported from mainline
    2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/59107
            * gfortran.dg/pr59107.f90: New test.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [8/9/10/11 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (17 preceding siblings ...)
  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
  20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-11 11:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:5a17beaecadf10d1c9c44d2b31eedc11dfdea35a

commit r9-8584-g5a17beaecadf10d1c9c44d2b31eedc11dfdea35a
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Mon May 11 12:38:14 2020 +0100

    Fortran : Spurious warning message with -Wsurprising PR59107

    This change is from a patch developed for gcc-5.  The code
    has moved on since then requiring a change to interface.c

    2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

    Backported from mainline
    2020-05-11  Janus Weil  <janus@gcc.gnu.org>
                Dominique d'Humieres  <dominiq@lps.ens.fr>

    gcc/fortran/

            PR fortran/59107
            * gfortran.h: Rename field resolved as resolve_symbol_called
            and assign two 2 bits instead of 1.
            * interface.c (gfc_find_typebound_dtio_proc): Use new field name.
            * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
            field with resolve_symbol_called is at least 2, if it is not
            set the field to 2.  (resolve_typebound_procedure): Use new field
            name.  (resolve_symbol): Use new field name and check whether it
            is at least 1, if it is not set the field to 1.

    Backported from mainline
    2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/59107
            * gfortran.dg/pr59107.f90: New test.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [8/9/10/11 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (18 preceding siblings ...)
  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
  20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-11 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:3d32b5c89438dbec423e48954ebffe51ee2b8dda

commit r8-10247-g3d32b5c89438dbec423e48954ebffe51ee2b8dda
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Mon May 11 12:38:14 2020 +0100

    Fortran : Spurious warning message with -Wsurprising PR59107

    This change is from a patch developed for gcc-5.  The code
    has moved on since then requiring a change to interface.c

    2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

    Backported from mainline
    2020-05-11  Janus Weil  <janus@gcc.gnu.org>
                Dominique d'Humieres  <dominiq@lps.ens.fr>

    gcc/fortran/

            PR fortran/59107
            * gfortran.h: Rename field resolved as resolve_symbol_called
            and assign two 2 bits instead of 1.
            * interface.c (gfc_find_typebound_dtio_proc): Use new field name.
            * resolve.c (gfc_resolve_intrinsic): Replace check of the formal
            field with resolve_symbol_called is at least 2, if it is not
            set the field to 2.  (resolve_symbol): Use new field name and
            check whether it is at least 1, if it is not set the field to 1.

    Backported from mainline
    2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/59107
            * gfortran.dg/pr59107.f90: New test.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug fortran/59107] [8/9/10/11 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising.
  2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising mathewc at nag dot co.uk
                   ` (19 preceding siblings ...)
  2020-05-11 14:11 ` cvs-commit at gcc dot gnu.org
@ 2020-05-11 14:12 ` markeggleston at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: markeggleston at gcc dot gnu.org @ 2020-05-11 14:12 UTC (permalink / raw)
  To: gcc-bugs

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

markeggleston at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markeggleston at gcc dot gnu.org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #23 from markeggleston at gcc dot gnu.org ---
Commits to master and backported to gcc-10, gcc-9 and gcc-8.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-05-11 14:12 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13  9:33 [Bug fortran/59107] New: Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising 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
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

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).