RISC-V: Refactor Dynamic LMUL codes
[official-gcc.git] / gcc / testsuite / gfortran.dg / selected_real_kind_2.f90
blobd2d38d46578097b7744d1f3961cf7acf317b2e47
1 ! { dg-do run }
2 ! { dg-options "-std=f2008 " }
5 integer :: p, r, rdx
7 ! Compile-time version
9 if (selected_real_kind(radix=2) /= 4) call should_not_fail()
10 if (selected_real_kind(radix=4) /= -5) call should_not_fail()
11 if (selected_real_kind(precision(0.0),range(0.0),radix(0.0)) /= kind(0.0)) &
12 call should_not_fail()
13 if (selected_real_kind(precision(0.0d0),range(0.0d0),radix(0.0d0)) /= kind(0.0d0)) &
14 call should_not_fail()
16 ! Run-time version
18 rdx = 2
19 if (selected_real_kind(radix=rdx) /= 4) STOP 1
20 rdx = 4
21 if (selected_real_kind(radix=rdx) /= -5) STOP 2
23 rdx = radix(0.0)
24 p = precision(0.0)
25 r = range(0.0)
26 if (selected_real_kind(p,r,rdx) /= kind(0.0)) STOP 3
28 rdx = radix(0.0d0)
29 p = precision(0.0d0)
30 r = range(0.0d0)
31 if (selected_real_kind(p,r,rdx) /= kind(0.0d0)) STOP 4
32 end