2 ! { dg-options "-Wall -pedantic" }
6 ! More tests for allocatable scalars
10 integer, allocatable :: a
13 if (allocated (a)) call abort ()
14 if (allocated (func (.false.))) call abort ()
15 if (.not.allocated (func (.true.))) call abort ()
18 if (b /= 5332) call abort ()
21 if (b /= 5333) call abort ()
23 call intout (a, .false.)
24 if (allocated (a)) call abort ()
25 call intout (a, .true.)
26 if (.not.allocated (a)) call abort ()
27 if (a /= 764) call abort ()
29 if (allocated (a)) call abort ()
31 if (allocated (func2 ())) call abort ()
35 integer, allocatable :: func
37 if (allocated (func)) call abort ()
45 integer, allocatable :: func2
48 subroutine intout (dum, alloc)
50 integer, allocatable,intent(out) :: dum
52 if (allocated (dum)) call abort()
59 subroutine intout2 (dum) ! { dg-warning "declared INTENT.OUT. but was not set" }
60 integer, allocatable,intent(out) :: dum
61 end subroutine intout2