| 1 |
! { dg-do run } |
| 2 |
! Test XFAILed on Darwin because the system's printf() lacks |
| 3 |
! proper support for denormals. |
| 4 |
! |
| 5 |
! This tests that the default formats for formatted I/O of reals are |
| 6 |
! wide enough and have enough precision, by checking that values can |
| 7 |
! be written and read back. |
| 8 |
! |
| 9 |
include "default_format_1.inc" |
| 10 |
|
| 11 |
program main |
| 12 |
use test_default_format |
| 13 |
|
| 14 |
if (test (1.0_4, 0) /= 0) STOP 1 |
| 15 |
if (test (tiny(0.0_4), 1) /= 0) STOP 2 |
| 16 |
if (test (-tiny(0.0_4), -1) /= 0) STOP 3 |
| 17 |
if (test (huge(0.0_4), -1) /= 0) STOP 4 |
| 18 |
if (test (-huge(0.0_4), 1) /= 0) STOP 5 |
| 19 |
|
| 20 |
if (test (1.0_8, 0) /= 0) STOP 6 |
| 21 |
if (test (tiny(0.0_8), 1) /= 0) STOP 7 |
| 22 |
if (test (-tiny(0.0_8), -1) /= 0) STOP 8 |
| 23 |
if (test (huge(0.0_8), -1) /= 0) STOP 9 |
| 24 |
if (test (-huge(0.0_8), 1) /= 0) STOP 10 |
| 25 |
end program main |
| 26 |
! |