| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fcheck=pointer -fdump-tree-original" } |
| 3 |
! |
| 4 |
! PR fortran/99602 |
| 5 |
! |
| 6 |
|
| 7 |
module m |
| 8 |
implicit none |
| 9 |
contains |
| 10 |
subroutine wr(y) |
| 11 |
class(*), pointer :: y |
| 12 |
if (associated (y)) stop 1 |
| 13 |
end |
| 14 |
end module m |
| 15 |
|
| 16 |
use m |
| 17 |
implicit none |
| 18 |
class(*), pointer :: cptr |
| 19 |
|
| 20 |
nullify (cptr) |
| 21 |
call wr(cptr) |
| 22 |
end |
| 23 |
|
| 24 |
! { dg-final { scan-tree-dump-not "_gfortran_runtime_error_at" "original" } } |
| 25 |
! { dg-final { scan-tree-dump-not "Pointer actual argument" "original" } } |