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

            Bug ID: 58998
           Summary: [4.8/4.9 Regression] Generic interface problem with
                    gfortran
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

Paul van Delst reports at
https://groups.google.com/forum/#!topic/comp.lang.fortran/MzOnH6_yvPU the
following issue.

Compiles with GCC 4.4.6, 4.6, 4.7.3, ifort v12.4 and PGI v11.
Fails with GCC 4.8 and 4.9 with:
           iargc_8=iargc()
                   1
Error: Function 'iargc_8' at (1) cannot be called recursively, as it is
not RECURSIVE

Conclusion of Robert Corbett and Richard Maine was that the code is ugly but
valid.


   module args_mod
     interface iargc
       module procedure iargc_8
     end interface
     interface getarg
       subroutine getarg(k,c)
         integer(4) k
         character*(*) c
       end subroutine getarg
       module procedure getarg_8
     end interface
   contains
     integer(8) function iargc_8()
       integer(4) iargc
       iargc_8=iargc()
     end function iargc_8
     subroutine getarg_8(k,c)
       integer(8) k
       character*(*) c
       integer(4) k4
       k4=k
       call getarg(k4,c)
     end subroutine getarg_8
   end module args_mod

Reply via email to