re PR libfortran/77393 (Revision r237735 changed the behavior of F0.0)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 31 Aug 2016 17:54:32 +0000 (17:54 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 31 Aug 2016 17:54:32 +0000 (17:54 +0000)
2016-08-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/77393
* gfortran.dg/fmt_f0_2.f90: New test.

From-SVN: r239901

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/fmt_f0_2.f90 [new file with mode: 0644]

index 61dc053..20535a1 100644 (file)
@@ -1,3 +1,8 @@
+2016-08-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/77393
+       * gfortran.dg/fmt_f0_2.f90: New test.
+
 2016-08-31  Marc Glisse  <marc.glisse@inria.fr>
 
        * 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 (file)
index 0000000..6e679fc
--- /dev/null
@@ -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
+