[patch, fortran] Bug 84506 - [6/7/8 Regression]INQUIRE(pos=) always sets pos=0 with -fdefault-integer-8

Jerry DeLisle jvdelisle@charter.net
Fri Feb 23 16:27:00 GMT 2018


Hi Folks,

This bug is a result of a range check we do on kind=8 unit numbers to 
make sure they fall within the range values of a kind=4 integer. We were 
limiting this range to positive values. I think when we introduced the 
newunit feature which uses negative unit values, we missed this adjustment.

The attached patch is trivial. Regression tested on x86_86-pc-linux-gnu.

I will back port to 6 an 7 after approval here. I will use the case in 
the PR as a new test case.

OK for trunk?

Regards,

Jerry

2018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/84506
	* trans-io.c (set_parameter_value_inquire): Adjust range check of
	negative unit values for kind=8 units to the kind=4 negative limit.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr84506.diff
Type: text/x-patch
Size: 996 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180223/6e1f859b/attachment.bin>


More information about the Gcc-patches mailing list