public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77
@ 2004-01-31  1:45 bdavis9659 at comcast dot net
  2004-01-31  2:43 ` [Bug fortran/13939] [gfortran] Does not accept " bdavis9659 at comcast dot net
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-01-31  1:45 UTC (permalink / raw)
  To: gcc-bugs

Below code is accepted by g77 (albeit with warnings) and is rejected by gfortran.

This is not "standard conforming" f77,f66, or f90 code, but it was supported by
at least one f77 compiler (SEL/Gould) and is currently accepted by g77.

 
$ cat example7.f
       I = 1
       CALL VARARGS(I,,)
       END
       SUBROUTINE VARARGS(I,J,K)
       PRINT*,I
       END
$ g77 example7.f
example7.f: In subroutine `varargs':
example7.f:2: warning:
          CALL VARARGS(I,,)
               1
example7.f:4: (continued):
          SUBROUTINE VARARGS(I,J,K)
                     2
Too many arguments for `varargs' at (1) versus invocation at (2) [info -f g77 M
GLOBALS]
$ ./a.out
 1
$ /usr/local/bin/gfortran example7.f
 In file example7.f:2
 
       CALL VARARGS(I,,)
                     1
Error: Syntax error in argument list at (1)

$ /usr/local/bin/gfortran --version
GNU Fortran 95 (GCC 3.5-tree-ssa 20040128 (merged 20040102))

-- 
           Summary: [gfortran] Does not except missing subroutine arguments
                    like g77
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bdavis9659 at comcast dot net
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
  2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
@ 2004-01-31  2:43 ` bdavis9659 at comcast dot net
  2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-01-31  2:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[gfortran] Does not except  |[gfortran] Does not accept
                   |missing subroutine arguments|missing subroutine arguments
                   |like g77                    |like g77


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


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

* [Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
  2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
  2004-01-31  2:43 ` [Bug fortran/13939] [gfortran] Does not accept " bdavis9659 at comcast dot net
  2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
@ 2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
  2004-02-06  1:20 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-31  3:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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


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

* [Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
  2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
  2004-01-31  2:43 ` [Bug fortran/13939] [gfortran] Does not accept " bdavis9659 at comcast dot net
@ 2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
  2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-31  3:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |tree-ssa


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


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

* [Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
  2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
                   ` (2 preceding siblings ...)
  2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
@ 2004-02-06  1:20 ` pinskia at gcc dot gnu dot org
  2004-05-24 15:39 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-06  1:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-06 01:20 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-06 01:20:08
               date|                            |


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


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

* [Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
  2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
                   ` (3 preceding siblings ...)
  2004-02-06  1:20 ` pinskia at gcc dot gnu dot org
@ 2004-05-24 15:39 ` pinskia at gcc dot gnu dot org
  2004-06-02 12:37 ` tobi at gcc dot gnu dot org
  2005-01-06 14:40 ` [Bug fortran/13939] " tobi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 15:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

* [Bug fortran/13939] [gfortran] Does not accept missing subroutine arguments like g77
  2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
                   ` (4 preceding siblings ...)
  2004-05-24 15:39 ` pinskia at gcc dot gnu dot org
@ 2004-06-02 12:37 ` tobi at gcc dot gnu dot org
  2005-01-06 14:40 ` [Bug fortran/13939] " tobi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-06-02 12:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-06-02 12:37 -------
As to the precise meaning of this feature, I quote the g77 documentation:
--------------------------
The `-fugly-comma' option enables use of a single trailing comma to
mean "pass an extra trailing null argument" in a list of actual
arguments to an external procedure, and use of an empty list of
arguments to such a procedure to mean "pass a single null argument".
                                                                                
   (Null arguments often are used in some procedure-calling schemes to
indicate omitted arguments.)
                                                                                
   For example, `CALL FOO(,)' means "pass two null arguments", rather
than "pass one null argument".  Also, `CALL BAR()' means "pass one null
argument".
                                                                                
   This construct is considered "ugly" because it does not provide an
elegant way to pass a single null argument that is syntactically
distinct from passing no arguments.  That is, this construct changes
the meaning of code that makes no use of the construct.
--------------------------
This doesn't seem to conincide with the output Bud quoted, so apparently g77
accepts those commas even with -fno-ugly-commas, passing nothing for those
omitted arguments it seems.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org


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


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

* [Bug fortran/13939] Does not accept missing subroutine arguments like g77
  2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
                   ` (5 preceding siblings ...)
  2004-06-02 12:37 ` tobi at gcc dot gnu dot org
@ 2005-01-06 14:40 ` tobi at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 14:40 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |


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


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

end of thread, other threads:[~2005-01-06 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-31  1:45 [Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77 bdavis9659 at comcast dot net
2004-01-31  2:43 ` [Bug fortran/13939] [gfortran] Does not accept " bdavis9659 at comcast dot net
2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
2004-01-31  3:20 ` pinskia at gcc dot gnu dot org
2004-02-06  1:20 ` pinskia at gcc dot gnu dot org
2004-05-24 15:39 ` pinskia at gcc dot gnu dot org
2004-06-02 12:37 ` tobi at gcc dot gnu dot org
2005-01-06 14:40 ` [Bug fortran/13939] " tobi at gcc dot gnu dot 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).