gcc/testsuite/gfortran.dg/associated_target_8.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/100892 - procedure pointer to function returning array of size n |
| 3 | |
| 4 | module m |
| 5 | implicit none |
| 6 | procedure(func1), pointer :: my_ptr => null() |
| 7 | contains |
| 8 | subroutine test_sub |
| 9 | if (associated (my_ptr, func1)) print *,'associated' |
| 10 | end subroutine test_sub |
| 11 | function func1 (n) |
| 12 | integer, intent(in) :: n |
| 13 | real, dimension(n) :: func1 |
| 14 | func1 = 0. |
| 15 | end function |
| 16 | end module m |