re PR fortran/57822 (I/O: "(g0)" wrongly prints "E+0000")

2015-02-10 Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/57822
	* io/write_float.def (output_float): Apply fix of previous patch
	to correctly calculate the exponent number of digits and take
	care of wide character output.

From-SVN: r220606
This commit is contained in:
Jerry DeLisle 2015-02-11 04:29:06 +00:00
parent 6dc6e7d061
commit 80f6181e27
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2015-02-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/57822
* io/write_float.def (output_float): Apply fix of previous patch
to correctly calculate the exponent number of digits and take
care of wide character output.
2015-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/57822

View File

@ -446,7 +446,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
skip:
/* Calculate the format of the exponent field. */
if (expchar)
if (expchar && !(dtp->u.p.g0_no_blanks && e == 0))
{
edigits = 1;
for (i = abs (e); i >= 10; i /= 10)
@ -632,7 +632,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size,
}
/* Output the exponent. */
if (expchar)
if (expchar && !(dtp->u.p.g0_no_blanks && e == 0))
{
if (expchar != ' ')
{