| 1 |
! { dg-do run } |
| 2 |
|
| 3 |
use, intrinsic :: ieee_arithmetic |
| 4 |
implicit none |
| 5 |
|
| 6 |
real :: sx1, sx2, sx3 |
| 7 |
double precision :: dx1, dx2, dx3 |
| 8 |
|
| 9 |
! IEEE_AWAY was added in Fortran 2018 and not supported by any target |
| 10 |
! at the moment. Just check we can query for its support. |
| 11 |
|
| 12 |
! We should support at least C float and C double types |
| 13 |
if (ieee_support_rounding(ieee_away) & |
| 14 |
.or. ieee_support_rounding(ieee_away, 0.) & |
| 15 |
.or. ieee_support_rounding(ieee_away, 0.d0)) then |
| 16 |
print *, "If a target / libc now supports this, we need to add a proper check!" |
| 17 |
stop 1 |
| 18 |
end if |
| 19 |
|
| 20 |
end |