Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.dg / pure_byref_1.f90
blob5e080e5af101c5cf25cecdd527fd2b1172c02f95
1 ! { dg-do run }
2 ! PR 22607: PURE/ELEMENTAL return-by-reference functions
3 program main
4 implicit none
5 character(2), dimension(2) :: a, b
6 a = 'ok'
7 b = fun(a)
8 if (.not.all(b == 'ok')) call abort()
9 contains
10 elemental function fun(a)
11 character(*), intent(in) :: a
12 character(len(a)) :: fun
13 fun = a
14 end function fun
15 end program main