Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.dg / array_alloc_1.f90
blob86e69e0afd68ad27b8ca33f9aac17a5fca56e752
1 ! PR 21104. Make sure that either f() or its caller will allocate
2 ! the array data. We've decided to make the caller allocate it.
3 ! { dg-do run }
4 program main
5 implicit none
6 call test (f ())
7 contains
8 subroutine test (x)
9 integer, dimension (10) :: x
10 integer :: i
11 do i = 1, 10
12 if (x (i) .ne. i * 100) call abort
13 end do
14 end subroutine test
16 function f
17 integer, dimension (10) :: f
18 integer :: i
19 forall (i = 1:10) f (i) = i * 100
20 end function f
21 end program main