2 ! PR35962 Implement F2003 rounding modes.
3 ! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 character(11) :: fmt(7)
7 fmt = (/'(RU,6F10.1)', '(RD,6F10.1)', '(RZ,6F10.1)', &
8 '(RN,6F10.2)', '(RC,6F10.2)', '(RP,6F10.1)', &
11 !print fmt(i), 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
13 write(line, fmt(1)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
14 if (line.ne." 1.3 1.3 1.3 1.3 1.3 1.2") STOP 1
15 write(line, fmt(2)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
16 if (line.ne." 1.2 1.2 1.2 1.2 1.2 1.1") STOP 2
17 write(line, fmt(3)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
18 if (line.ne." 1.2 1.2 1.2 1.2 1.2 1.1") STOP 3
19 write(line, fmt(4)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
20 if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.12") STOP 4
21 write(line, fmt(5)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
22 if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.13") STOP 5
23 write(line, fmt(6)) 1.20, 1.22, 1.250001, 1.27, 1.30, 1.125
24 if (line.ne." 1.2 1.2 1.3 1.3 1.3 1.1") STOP 6
25 write(line, fmt(7)) 1.20, 1.22, 1.250001, 1.27, 1.30, 1.125
26 if (line.ne." +1.2 +1.2 +1.3 +1.3 +1.3 +1.1") STOP 7