diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/large_real_kind_form_io_2.f90 | 33 |
2 files changed, 38 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d21d5a7..34202b7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-02-06 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR libfortran/24685 + * gfortran.dg/large_real_kind_form_io_2.f90: New test. + 2006-02-05 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/25251 diff --git a/gcc/testsuite/gfortran.dg/large_real_kind_form_io_2.f90 b/gcc/testsuite/gfortran.dg/large_real_kind_form_io_2.f90 new file mode 100644 index 0000000..d48e3d5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/large_real_kind_form_io_2.f90 @@ -0,0 +1,33 @@ +! { dg-do run } +! { dg-require-effective-target fortran_large_real } +! PR libfortran/24685 +program large_real_kind_form_io_2 + ! This should be 10 or 16 on systems that support kind=10 or kind=16 + integer, parameter :: k = selected_real_kind (precision (0.0_8) + 1) + real(kind=k) :: a,b(2), c + character(len=180) :: tmp + + b(:) = huge(0.0_k) + write (tmp, *) b + read (tmp, *) a, c + if (a /= b(1)) call abort () + if (c /= b(2)) call abort () + + b(:) = -huge(0.0_k) + write (tmp, *) b + read (tmp, *) a, c + if (a /= b(1)) call abort () + if (c /= b(2)) call abort () + + b(:) = tiny(0.0_k) + write (tmp, *) b + read (tmp, *) a, c + if (a /= b(1)) call abort () + if (c /= b(2)) call abort () + + b(:) = -tiny(0.0_k) + write (tmp, *) b + read (tmp, *) a, c + if (a /= b(1)) call abort () + if (c /= b(2)) call abort () +end program large_real_kind_form_io_2 |