]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gfortran.dg/output_exponents_1.f90: New test.
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Sun, 29 May 2005 12:44:37 +0000 (14:44 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 29 May 2005 12:44:37 +0000 (12:44 +0000)
From-SVN: r100319

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

index 1c7fcd55bf15fbbb4dbfb54fc004d24e30acd318..cbdd397eb9e1606dfd5986b9ae66909c71c48ddd 100644 (file)
@@ -1,3 +1,7 @@
+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.
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