Fix compilation failure with C++98 compilers
[official-gcc.git] / gcc / testsuite / gfortran.dg / repeat_3.f90
blob1bd23449283993357e313c0987b35eca57804c77
1 ! REPEAT intrinsic, test for PR 31304
2 ! We check that REPEAT accepts all kind arguments for NCOPIES
4 ! { dg-do run }
5 program test
6 implicit none
8 integer(kind=1) i1
9 integer(kind=2) i2
10 integer(kind=4) i4
11 integer(kind=4) i8
12 real(kind=8) r
13 character(len=2) s1, s2
15 i1 = 1 ; i2 = 1 ; i4 = 1 ; i8 = 1
16 r = 1
17 s1 = '42'
18 r = nearest(r,r)
20 s2 = repeat(s1,i1)
21 if (s2 /= s1) STOP 1
22 s2 = repeat(s1,i2)
23 if (s2 /= s1) STOP 2
24 s2 = repeat(s1,i4)
25 if (s2 /= s1) STOP 3
26 s2 = repeat(s1,i8)
27 if (s2 /= s1) STOP 4
29 end program test