2 ! { dg-options "-Wall -pedantic" }
4 ! PR fortran/41872; updated due to PR fortran/46484
6 ! More tests for allocatable scalars
10 integer, allocatable :: a
13 if (allocated (a)) call abort ()
16 if (b /= 5332) call abort ()
19 if (b /= 5333) call abort ()
21 call intout (a, .false.)
22 if (allocated (a)) call abort ()
23 call intout (a, .true.)
24 if (.not.allocated (a)) call abort ()
25 if (a /= 764) call abort ()
27 if (allocated (a)) call abort ()
32 integer, allocatable :: func
34 if (allocated (func)) call abort ()
41 subroutine intout (dum, alloc)
43 integer, allocatable,intent(out) :: dum
45 if (allocated (dum)) call abort()
52 subroutine intout2 (dum) ! { dg-warning "declared INTENT.OUT. but was not set" }
53 integer, allocatable,intent(out) :: dum
54 end subroutine intout2