diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c13dd7041ff..ef1433f0b83 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-02-27 Tobias Schl"uter + + * gfortran.dg/e_d_fmt.f90: New test. + 2005-02-27 Kazu Hirata * 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 00000000000..1abfa6105ea --- /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 diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 03793e852ac..c7b5821e890 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2004-02-27 Tobias Schl"uter + + * io/write.c (output_float): Fix typo in condition. + 2005-02-25 Peter O'Gorman Toon Moene diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 19744d294c0..d4ee605de29 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -395,7 +395,7 @@ output_float (fnode *f, double value, int len) nafter = d; } - if (ft = FMT_E) + if (ft == FMT_E) expchar = 'E'; else expchar = 'D';