[to-be-committed,RISC-V] Eliminate unnecessary sign extension after inlined str[n]cmp
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / save_1.f90
blob499bda55a91c2512ec601d6c839d2b7a832f23cd
1 subroutine foo (b)
2 logical b
3 integer i, j
4 character*24 s
5 save
6 if (b) then
7 i = 26
8 j = 131
9 s = 'This is a test string'
10 else
11 if (i .ne. 26 .or. j .ne. 131) STOP 1
12 if (s .ne. 'This is a test string') STOP 2
13 end if
14 end subroutine foo
15 subroutine bar (s)
16 character*42 s
17 if (s .ne. '0123456789012345678901234567890123456') STOP 3
18 call foo (.false.)
19 end subroutine bar
20 subroutine baz
21 character*42 s
22 ! Just clobber stack a little bit.
23 s = '0123456789012345678901234567890123456'
24 call bar (s)
25 end subroutine baz
26 call foo (.true.)
27 call baz
28 call foo (.false.)
29 end