summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/proc_ptr_27.f90
blob: 83f09598110dde3a4e1b8278e84ea59e2ec999b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
!
! PR fortran/44446
!
! Contributed by Marco Restelli.
!
! Procedure pointer with PROTECTED was wrongly rejected.
!
module m
 implicit none
 abstract interface
  pure function i_f(x) result(y)
   real, intent(in) :: x
   real :: y
  end function i_f
 end interface
 procedure(i_f), pointer, protected :: p_f => null()
end module m

! { dg-final { cleanup-modules "m" } }