Reverting merge from trunk
[official-gcc.git] / gcc / testsuite / gfortran.dg / null_6.f90
blobdd517cfa3e2b3bfd5a068925bc653e2e19556c8a
1 ! { dg-do compile }
2 ! { dg-options "-std=f2008" }
4 ! PR fortran/34547
5 ! PR fortran/50375
7 subroutine test_PR50375_3 ()
8 interface gen3
9 subroutine s31 (pi)
10 integer, pointer :: pi
11 end subroutine
12 subroutine s32 (pr)
13 real, allocatable :: pr(:)
14 end subroutine
15 end interface
16 call gen3 (null ()) ! OK
17 end subroutine test_PR50375_3
19 subroutine test_PR50375_2 ()
20 interface gen2
21 subroutine s21 (pi)
22 integer, pointer :: pi
23 end subroutine
24 subroutine s22 (pr)
25 real, optional :: pr
26 end subroutine
27 end interface
28 call gen2 (null ()) ! { dg-error "MOLD= required in NULL|There is no specific subroutine" }
29 end subroutine test_PR50375_2
31 subroutine test_PR34547_3 ()
32 integer, allocatable :: i(:)
33 print *, NULL(i)
34 end subroutine test_PR34547_3