PR rtl-optimization/82913
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / strret.f90
blob7346fff5df70f94ec873dc0a2610b7449bd8cd4e
1 ! Program to test caracter string return values
2 function test ()
3 implicit none
4 character(len=10) :: test
5 test = "World"
6 end function
8 function test2 () result (r)
9 implicit none
10 character(len=5) :: r
11 r = "Hello"
12 end function
14 program strret
15 implicit none
16 character(len=15) :: s
17 character(len=10) :: test
18 character(len=5) :: test2
20 s = test ()
21 if (s .ne. "World") call abort
23 s = "Hello " // test ()
24 if (s .ne. test2 () //" World") call abort
25 end