| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2003" } |
| 3 |
! |
| 4 |
! NULL() actual argument to non-pointer dummies |
| 5 |
! |
| 6 |
|
| 7 |
call f(null()) ! { dg-error "Fortran 2008: Null pointer at .1. to non-pointer dummy" } |
| 8 |
call g(null()) ! { dg-error "Unexpected NULL.. intrinsic at .1. to dummy" } |
| 9 |
call h(null()) ! { dg-error "Unexpected NULL.. intrinsic at .1. to dummy" } |
| 10 |
contains |
| 11 |
subroutine f(x) |
| 12 |
integer, optional :: x |
| 13 |
end subroutine f |
| 14 |
subroutine g(x) |
| 15 |
integer, optional, allocatable :: x |
| 16 |
end subroutine g |
| 17 |
subroutine h(x) |
| 18 |
integer :: x |
| 19 |
end subroutine h |
| 20 |
end |