Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.fortran-torture / execute / st_function_1.f90
blob0387a5f71c7afa254e99034235e651cbefed05a3
1 ! Check that character valued statement functions honour length parameters
2 program st_function_1
3 character(8) :: foo
4 character(15) :: bar
5 character(6) :: p
6 character (7) :: s
7 foo(p) = p // "World"
8 bar(p) = p // "World"
10 ! Expression longer than function, actual arg shorter than dummy.
11 call check (foo("Hello"), "Hello Wo")
13 ! Expression shorter than function, actual arg longer than dummy.
14 ! Result shorter than type
15 s = "Hello"
16 call check (bar(s), "Hello World ")
17 contains
18 subroutine check(a, b)
19 character (len=*) :: a, b
21 if ((a .ne. b) .or. (len(a) .ne. len(b))) call abort ()
22 end subroutine
23 end program