Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.fortran-torture / execute / strarray_4.f90
blobc33f4b53d69685428811db1788887f4be9d04937
1 program strarray_4
2 character(len=5), dimension(2) :: c
4 c(1) = "Hello"
5 c(2) = "World"
7 call foo1(c)
8 call foo2(c, 2)
9 call foo3(c, 5, 2)
10 contains
11 subroutine foo1(a)
12 implicit none
13 character(len=5), dimension(2) :: a
14 character(len=5), dimension(2) :: b
16 b = a;
17 if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
18 end subroutine
20 subroutine foo2(a, m)
21 implicit none
22 integer m
23 character(len=5), dimension(m) :: a
24 character(len=5), dimension(m) :: b
26 b = a
27 if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
28 end subroutine
30 subroutine foo3(a, n, m)
31 implicit none
32 integer n, m
33 character(len=n), dimension(m) :: a
34 character(len=n), dimension(m) :: b
36 b = a
37 if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
38 end subroutine
39 end program