gcc/testsuite/gfortran.dg/null_actual_3.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fallow-argument-mismatch -w" } |
| 3 | ! PR fortran/107576 |
| 4 | ! Contributed by G.Steinmetz |
| 5 | |
| 6 | program p |
| 7 | implicit none |
| 8 | interface |
| 9 | subroutine r(y) |
| 10 | integer, pointer :: y(:) |
| 11 | end subroutine r |
| 12 | end interface |
| 13 | integer, pointer :: z(:) => null() |
| 14 | call r(z) |
| 15 | call s(z) |
| 16 | call r(null(z)) |
| 17 | call s(null(z)) ! { dg-error "requires an explicit interface" } |
| 18 | end |