PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocatable_dummy_3.f90
blobb58f08abd550a6cee9c94f0d0d0962c664811b49
1 ! { dg-do run }
2 ! PR 28416: Check that allocatable dummies can be passed onwards as non-assumed
3 ! shape arg.
4 program main
6 implicit none
7 integer, allocatable :: a(:)
9 interface
10 subroutine foo(v_out)
11 integer, allocatable :: v_out(:)
12 end subroutine foo
13 end interface
15 call foo(a)
16 if (any(a /= [ 1, 2, 3 ])) STOP 1
18 end program
21 subroutine foo(v_out)
22 implicit none
23 integer, allocatable :: v_out(:)
25 allocate(v_out(3))
26 call bar(v_out, size(v_out))
27 end subroutine foo
30 subroutine bar(v, N)
31 implicit none
32 integer :: N
33 integer :: v(N)
34 integer :: i
36 do i = 1, N
37 v(i) = i
38 end do
39 end subroutine bar