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