aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2005-02-27 17:17:56 +0100
committerTobias Schlüter <tobi@gcc.gnu.org>2005-02-27 17:17:56 +0100
commit34d6d42fb48c22c2a17b948019c5fd162b74ff4a (patch)
tree73554e7745fbe1b6cd6e22f610aa28c5b83fbe40 /gcc
parentac5c8be21e3b5fc0f224b86de1f7a508295b9e41 (diff)
downloadgcc-34d6d42fb48c22c2a17b948019c5fd162b74ff4a.zip
gcc-34d6d42fb48c22c2a17b948019c5fd162b74ff4a.tar.gz
gcc-34d6d42fb48c22c2a17b948019c5fd162b74ff4a.tar.bz2
write.c (output_float): Fix typo in condition.
libgfortran/ * io/write.c (output_float): Fix typo in condition. gcc/testsuite/ * gfortran.dg/e_d_fmt.f90: New test. From-SVN: r95615
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gfortran.dg/e_d_fmt.f9013
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c13dd70..ef1433f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2005-02-27 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * gfortran.dg/e_d_fmt.f90: New test.
+
2005-02-27 Kazu Hirata <kazu@cs.umass.edu>
* gcc.dg/asm-b.c: Fix comment typos.
diff --git a/gcc/testsuite/gfortran.dg/e_d_fmt.f90 b/gcc/testsuite/gfortran.dg/e_d_fmt.f90
new file mode 100644
index 0000000..1abfa61
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/e_d_fmt.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+! Verify that the D format uses 'D' as the exponent character.
+! " " " E " " 'E' " " " "
+CHARACTER*10 c1, c2
+REAL*8 r
+r = 1.0
+write(c1,"(e9.2)") r
+write(c2,"(d9.2)") r
+
+if (trim(adjustl(c1)) .ne. "0.10E+01") call abort()
+if (trim(adjustl(c2)) .ne. "0.10D+01") call abort()
+
+END