Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288]
[official-gcc.git] / gcc / testsuite / gfortran.dg / intent_out_19.f90
blob03036ed382a825694e8f101f6e79a4cc5aa52783
1 ! { dg-do run }
3 ! PR fortran/92178
4 ! Check that if a data reference passed is as actual argument whose dummy
5 ! has INTENT(OUT) attribute, any other argument depending on the
6 ! same data reference is evaluated before the data reference deallocation.
8 program p
9 implicit none
10 class(*), allocatable :: c
11 c = 3
12 call bar (allocated(c), c, allocated (c))
13 if (allocated (c)) stop 14
14 contains
15 subroutine bar (alloc, x, alloc2)
16 logical :: alloc, alloc2
17 class(*), allocatable, intent(out) :: x(..)
18 if (allocated (x)) stop 5
19 if (.not. alloc) stop 6
20 if (.not. alloc2) stop 16
21 end subroutine bar
22 end