[patch, libgfortran] PR32446 F0.n output format fails with large numbers
Jerry DeLisle
jvdelisle@verizon.net
Sat Jun 23 03:04:00 GMT 2007
:ADDPATCH fortran:
This patch fixes this by setting the ndigits to zero appropriately. If you
study the code you will see that previously, ndigits was going negative for the
case where the nbefore is greater. The initial patch I posted to the PR was way
wrong. :)
Regression tested on x86-64-pc-Gnu/Linux.
Test case included.
OK for trunk?
Eventually, this should go to 4.2. It is a regression against g77. I was able
to reproduce the failure with large width formats and large real constants and
they passed on g77.
Regards,
Jerry
2007-06-22 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fmt_huge.f90
Type: text/x-fortran
Size: 179 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070623/84b014d7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr32446.diff
Type: text/x-patch
Size: 901 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070623/84b014d7/attachment-0001.bin>
More information about the Fortran
mailing list