mirror of git://gcc.gnu.org/git/gcc.git
re PR fortran/37834 (write(*,'(f0.0)') 0.0 prints "." instead of "0.")
2008-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org PR libfortran/37834 * io/write_float.def (output_float): Emit '0.' for special case of format specifier 'f0.0' and value of zero. Likewise emit '0' for 'f1.0'. From-SVN: r141231
This commit is contained in:
parent
a15138a45f
commit
f13c001e1a
|
@ -1,3 +1,9 @@
|
||||||
|
2008-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org
|
||||||
|
|
||||||
|
PR libfortran/37834
|
||||||
|
* io/write_float.def (output_float): Emit '0.' for special case of
|
||||||
|
format specifier 'f0.0' and value of zero. Likewise emit '0' for 'f1.0'.
|
||||||
|
|
||||||
2008-10-17 Jerry DeLisle <jvdelisle@gcc.gnu.org
|
2008-10-17 Jerry DeLisle <jvdelisle@gcc.gnu.org
|
||||||
|
|
||||||
PR libfortran/37863
|
PR libfortran/37863
|
||||||
|
|
|
@ -119,6 +119,22 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
|
||||||
sign = calculate_sign (dtp, sign_bit);
|
sign = calculate_sign (dtp, sign_bit);
|
||||||
else
|
else
|
||||||
sign = calculate_sign (dtp, 0);
|
sign = calculate_sign (dtp, 0);
|
||||||
|
|
||||||
|
/* Handle special cases. */
|
||||||
|
if (w == 0)
|
||||||
|
w = 2;
|
||||||
|
|
||||||
|
/* For this one we choose to not output a decimal point.
|
||||||
|
F95 10.5.1.2.1 */
|
||||||
|
if (w == 1 && ft == FMT_F)
|
||||||
|
{
|
||||||
|
out = write_block (dtp, w);
|
||||||
|
if (out == NULL)
|
||||||
|
return;
|
||||||
|
*out = '0';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalize the fractional component. */
|
/* Normalize the fractional component. */
|
||||||
|
|
Loading…
Reference in New Issue