gcc/testsuite/gfortran.dg/pr77960.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/77960 |
| 3 | procedure(g), pointer :: f |
| 4 | f => g |
| 5 | read(99) f ! { dg-error "Expecting variable" } |
| 6 | contains |
| 7 | function g() result(z) |
| 8 | integer :: z(2) |
| 9 | z = 1 |
| 10 | end |
| 11 | end |
| 12 | |
| 13 | subroutine bar(x) |
| 14 | integer, external :: x |
| 15 | read(*,*) x ! { dg-error "Expecting variable" } |
| 16 | end subroutine |