[PATCH, libgfortran] Fix PR21875 (FM111.f) BN and BZ format specifiers
Jerry DeLisle
jvdelisle@verizon.net
Wed Jul 20 05:04:00 GMT 2005
Jerry DeLisle wrote:
>
> I have isolated two separate problems. The first is discovered
> coincidentally bacause of the manual entry of numbers from the console
> in the reduced case given in bugzilla that you referred to.
>
> 1) When reading from stdin, the flags.blank was set to BLANK_ZERO. This
> causes trailing blanks on input fields to be converted to zero's
> resulting in exponents out of range. This is in io/unit.c. The default
> should be set to BLANK_UNSPECIFIED.
>
> Once that is fixed, then 2 happens
>
> 2) Exponents with trailing blanks are getting garbaged up for some
> reason. I am in the middle of fixing that.
>
The attached patches fix the problems in libgfortran and revise the test
case to include a test of the snippet similar to the SPECfp problem with
trailing blanks in exponents.
Regression tested (excluding real_const_1.f90, real_const_2.f90, and
elemental.f90, which are failing from something else).
2005-07-19 Jerry DeLisle <jvdelisle@verizon.net>
* io/read.c (read_f): Fix reading of trailing blanks in exponents
related to BZ and BN format specifier logic.
* io/unit.c (init_units): Change default setting of u->flags.blank
to BLANK_UNSPECIFIED for stdin, stdout, and stderr.
OK to commit to mainline and 4.0?
Jerry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bz-bn.diff
Type: text/x-patch
Size: 3843 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050720/5045e159/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bz_bn_test.diff
Type: text/x-patch
Size: 2005 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050720/5045e159/attachment-0001.bin>
More information about the Fortran
mailing list