PR rtl-optimization/82913
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / intrinsic_trim.f90
blobd57610cca5214637e2a8b8d6b16b49df218f0e59
1 ! Program to test the TRIM and REPEAT intrinsics.
2 program intrinsic_trim
3 character(len=8) a
4 character(len=4) b,work
5 a='1234 '
6 b=work(8,a)
7 if (llt(b,"1234")) call abort()
8 a=' '
9 b=trim(a)
10 if (b .gt. "") call abort()
11 b='12'
12 a=repeat(b,0)
13 if (a .gt. "") call abort()
14 a=repeat(b,2)
15 if (a .ne. "12 12 ") call abort()
16 end
18 function work(i,a)
19 integer i
20 character(len=i) a
21 character(len=4) work
22 work = trim(a)
23 end