gcc/testsuite/gfortran.dg/aint_anint_1.f90
raw| 1 | ! { dg-do run } |
| 2 | program aint_anint_1 |
| 3 | |
| 4 | implicit none |
| 5 | |
| 6 | real(4) :: r = 42.7, r1, r2 |
| 7 | real(8) :: s = 42.7D0, s1, s2 |
| 8 | |
| 9 | r1 = aint(r) |
| 10 | r2 = aint(r,kind=8) |
| 11 | if (abs(r1 - r2) > 0.1) STOP 1 |
| 12 | |
| 13 | r1 = anint(r) |
| 14 | r2 = anint(r,kind=8) |
| 15 | if (abs(r1 - r2) > 0.1) STOP 2 |
| 16 | |
| 17 | s1 = aint(s) |
| 18 | s2 = aint(s, kind=4) |
| 19 | if (abs(s1 - s2) > 0.1) STOP 3 |
| 20 | |
| 21 | s1 = anint(s) |
| 22 | s2 = anint(s, kind=4) |
| 23 | if (abs(s1 - s2) > 0.1) STOP 4 |
| 24 | |
| 25 | |
| 26 | end program aint_anint_1 |
| 27 |