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/40453] [F95] Enhanced (recursive) argument checking


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

--- Comment #2 from janus at gcc dot gnu.org 2012-10-06 14:44:07 UTC ---
Slightly reworked example, which I hope is a bit easier to grasp:


program RecursiveInterface

  call c(b2) ! b2's argument a2 has an integer argument,
             ! but c expects a routine like b1 with an argument a1
             ! with real argument

 contains

    subroutine a1(x)
      real :: x
    end subroutine

    subroutine a2(i)
      integer :: i
    end subroutine

    !!!!!!!!!!!!!!!

    subroutine b1(f)
      procedure(a1) :: f
    end subroutine

    subroutine b2(f)
      procedure(a2) :: f
    end subroutine

    !!!!!!!!!!!!!!!

    subroutine c(f)
     procedure(b1) :: f
    end subroutine e

end


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