From 8e95a6740883dc268f757173f98e9afdf786db80 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Wed, 31 Aug 2016 17:54:32 +0000 Subject: [PATCH] re PR libfortran/77393 (Revision r237735 changed the behavior of F0.0) 2016-08-31 Jerry DeLisle PR libgfortran/77393 * gfortran.dg/fmt_f0_2.f90: New test. From-SVN: r239901 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/fmt_f0_2.f90 | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/fmt_f0_2.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 61dc053a096..20535a191a0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-08-31 Jerry DeLisle + + PR libgfortran/77393 + * gfortran.dg/fmt_f0_2.f90: New test. + 2016-08-31 Marc Glisse * gcc.target/i386/pr59539-2.c: Adapt options. diff --git a/gcc/testsuite/gfortran.dg/fmt_f0_2.f90 b/gcc/testsuite/gfortran.dg/fmt_f0_2.f90 new file mode 100644 index 00000000000..6e679fcecb8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fmt_f0_2.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! PR77393 +program testbigf0 ! Can enormous numbers be printed with F0.0 format? + implicit none + character(10000) :: str + write(str, "(f0.0)") -huge(1.0) + if (len(trim(str)).lt.41) error stop "FAILED AT LINE 7" + write(str, "(f0.0)") -huge(1.0_8) + if (len(trim(str)).lt.311) error stop "FAILED AT LINE 9" + write(str, "(f0.0)") -huge(1.0_10) + if (len(trim(str)).lt.4935) error stop "FAILED AT LINE 11" + write(str, "(f0.10)") -huge(1.0_16) + if (len(trim(str)).lt.4945) error stop "FAILED AT LINE 13" +end program testbigf0 + -- 2.30.2