2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / repeat_3.f90
blobd571fc6e32a4fef58594c409bba4219574d38058
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) call abort
22 s2 = repeat(s1,i2)
23 if (s2 /= s1) call abort
24 s2 = repeat(s1,i4)
25 if (s2 /= s1) call abort
26 s2 = repeat(s1,i8)
27 if (s2 /= s1) call abort
29 end program test