Hi all,
   gfortran refuses the attached code as

pure function i_g(x,p) result(y)
                     1
Error: Dummy procedure 'p' of PURE procedure at (1) must also be PURE

Notice however that i_f is an abstract interface to a PURE function.
(As a comment, ifort accepts the code.)


module m1
 implicit none
 abstract interface
  pure function i_f(x) result(y)
   real, intent(in) :: x
   real :: y
  end function i_f
 end interface
end module m1

module m2
 use m1, only: i_f
 implicit none
contains
 pure function i_g(x,p) result(y)
  real, intent(in) :: x
  procedure(i_f), pointer, intent(in) :: p
  real :: y
   y = p(x)
 end function i_g
end module m2


-- 
           Summary: Problem with abstract interface to PURE function
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mrestelli at gmail dot com
 GCC build triplet: GNU Fortran (GCC) 4.6.0 20100821 (experimental)
  GCC host triplet: AMD Turion(tm) 64 Mobile Technology ML-32 AuthenticAMD
                    GNU/Linux


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

Reply via email to