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 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.