2
  ....
  abstract interface
     pure function fi(t,u) result (fu)
       use NumberKinds
       real(kp), dimension(:), intent(in) :: u
       real(kp), intent(in) :: t
       real(kp), dimension(size(u)) ::  fu
     end function fi
  end interface


contains

  pure function rk4_step(u,f,dt) result(un)
    use NumberKinds
    real(kp), intent(in) :: dt
    real(kp), intent(in),  dimension(:) :: u
    real(kp), dimension(size(u))  :: k1,k2,k3,k4,un
    procedure(fi) :: f
    integer :: N
    ...

  end function rk4_step
  ...

g95 で次のエラー メッセージが表示されます: G95 (GCC 4.0.3 (g95 0.94!) Jan 17 2013)

In file src/integrators.f95:34

  pure function rk4_step(u,f,dt) result(un)
                           1
Error: Dummy procedure 'f' of PURE procedure at (1) must also be PURE
Makefile:28: recipe for target 'test_rk4' failed

gfortran では取得できません: GNU Fortran (GCC) 4.8.2 20140206 (プレリリース) で、プログラムはさらに問題なくコンパイルされます

4

1 に答える 1