2012-03-17 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/52608
* io/write_float.def (output_float): Move removal of initial zeros
until after the scale factor has been applied.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185486
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-03-17 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR libfortran/52608
+ * io/write_float.def (output_float): Move removal of initial zeros
+ until after the scale factor has been applied.
+
2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
* io/unix.h (struct stream): Rename to stream_vtable.
/* Make sure the decimal point is a '.'; depending on the
locale, this might not be the case otherwise. */
digits[nbefore] = '.';
- if (digits[0] == '0' && nbefore == 1)
- {
- digits++;
- nbefore--;
- ndigits--;
- }
if (p != 0)
{
if (p > 0)
nafter = d;
}
+ while (digits[0] == '0' && nbefore > 0)
+ {
+ digits++;
+ nbefore--;
+ ndigits--;
+ }
+
expchar = 0;
/* If we need to do rounding ourselves, get rid of the dot by
moving the fractional part. */