re PR fortran/32446 (F0.n output format fails with large numbers)
2007-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/32446 * io/write.c (output_float): Calculate ndigits correctly for large numbered formats that must pad zeros before the decimal point. From-SVN: r125985
This commit is contained in:
parent
2eae3dc776
commit
69774e69a7
@ -1,3 +1,9 @@
|
||||
2007-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/32446
|
||||
* io/write.c (output_float): Calculate ndigits correctly for large
|
||||
numbered formats that must pad zeros before the decimal point.
|
||||
|
||||
2007-06-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
|
||||
|
||||
PR libfortran/32345
|
||||
|
@ -810,16 +810,21 @@ output_float (st_parameter_dt *dtp, const fnode *f, GFC_REAL_LARGEST value)
|
||||
if (nbefore > 0)
|
||||
{
|
||||
if (nbefore > ndigits)
|
||||
i = ndigits;
|
||||
{
|
||||
i = ndigits;
|
||||
memcpy (out, digits, i);
|
||||
ndigits = 0;
|
||||
while (i < nbefore)
|
||||
out[i++] = '0';
|
||||
}
|
||||
else
|
||||
i = nbefore;
|
||||
|
||||
memcpy (out, digits, i);
|
||||
while (i < nbefore)
|
||||
out[i++] = '0';
|
||||
{
|
||||
i = nbefore;
|
||||
memcpy (out, digits, i);
|
||||
ndigits -= i;
|
||||
}
|
||||
|
||||
digits += i;
|
||||
ndigits -= i;
|
||||
out += nbefore;
|
||||
}
|
||||
/* Output the decimal point. */
|
||||
|
Loading…
Reference in New Issue
Block a user