re PR libfortran/18025 (libgfortran: format, incompatible "minimum width" edit descriptor)

PR libfortran/18025
        * write.c (output_float): Handling the "F0.d" format similarly as
        commercial compilers.

        * pr18025.f90: New test.

From-SVN: r96953
This commit is contained in:
Francois-Xavier Coudert 2005-03-23 22:42:10 +01:00 committed by François-Xavier Coudert
parent 8d3ece5d90
commit fd4f678cf2
4 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-03-23 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* pr18025.f90: New test.
2005-03-23 Dale Johannesen <dalej@apple.com>
* gcc.dg/20020312-2.c: Fix for non-PowerPC Darwin.

View File

@ -0,0 +1,8 @@
! PR libfortran/18025 <coudert@clipper.ens.fr>
! {dg-do run}
character(len=80) :: c
write(c, "('#',F0.2,'#')") 1.23
if (c /= '#1.23#') call abort
write(c, "('#',F0.2,'#')") -1.23
if (c /= '#-1.23#') call abort
end

View File

@ -1,3 +1,9 @@
2005-02-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/18025
* write.c (output_float): Handling the "F0.d" format similarly as
commercial compilers.
2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* Makefile.am: Added new files.

View File

@ -537,7 +537,7 @@ output_float (fnode *f, double value, int len)
/* Pick a field size if none was specified. */
if (w <= 0)
w = nbefore + nzero + nafter + 2;
w = nbefore + nzero + nafter + (sign != SIGN_NONE ? 2 : 1)
/* Create the ouput buffer. */
out = write_block (w);