OSDN Git Service

* gfortran.dg/output_exponents_1.f90: New test.
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 29 May 2005 12:44:37 +0000 (12:44 +0000)
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 29 May 2005 12:44:37 +0000 (12:44 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100319 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 1c7fcd5..cbdd397 100644 (file)
@@ -1,5 +1,9 @@
 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
+       * gfortran.dg/output_exponents_1.f90: New test.
+
+2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
        * gfortran.dg/dollar_edit_descriptor-1.f: New test.
 
 2005-05-28  Mark Mitchell  <mark@codesourcery.com>
diff --git a/gcc/testsuite/gfortran.dg/output_exponents_1.f90 b/gcc/testsuite/gfortran.dg/output_exponents_1.f90
new file mode 100644 (file)
index 0000000..b645e62
--- /dev/null
@@ -0,0 +1,13 @@
+! { dg-do run }
+! PR 21376
+! we used to take the logarithm of zero in this special case
+  character*10 c
+  write (c,'(e10.4)') 1.0
+  if(c /= "0.1000E+01") call abort
+  write (c,'(e10.4)') 0.0
+  if(c /= "0.0000E+00") call abort
+  write (c,'(e10.4)') 1.0d100
+  if(c /= "0.1000+101") call abort
+  write (c,'(e10.4)') 1.0d-102
+  if(c /= "0.1000-101") call abort
+end