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:
parent
8d3ece5d90
commit
fd4f678cf2
@ -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.
|
||||
|
8
gcc/testsuite/gfortran.dg/pr18025.f90
Normal file
8
gcc/testsuite/gfortran.dg/pr18025.f90
Normal 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
|
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user