gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! PR 40451: [F03] procedure pointer assignment rejected |
| 4 | ! |
| 5 | ! Contributed by Tobias Burnus <[email protected]> |
| 6 | |
| 7 | contains |
| 8 | |
| 9 | function f() |
| 10 | intrinsic :: sin |
| 11 | abstract interface |
| 12 | pure real function sin_interf(x) |
| 13 | real, intent(in) :: x |
| 14 | end function sin_interf |
| 15 | end interface |
| 16 | ! We cannot use "sin" directly as it is ELEMENTAL |
| 17 | procedure(sin_interf), pointer :: f |
| 18 | f => sin |
| 19 | end function f |
| 20 | |
| 21 | end |
| 22 |