[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / null_actual.f90
blobb29e89d489880572b3253a4721b8f0a0ece85834
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
4 ! NULL() actual argument to non-pointer dummies
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