This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/13939] New: [gfortran] Does not except missing subroutine arguments like g77


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]