This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libgfortran] Fix PR20257 End of record occurs when writing large arrays
Jerry DeLisle wrote:
My first attempt at this was to use a negative number for unit. IIRC
there was specific existing code that generates an error for negative
unit numbers. I will explore this a bit and come back with something.
I must have been thinking of something else. I just tried -1 for the
internal unit number and it regression tested fine. So I think this
will do it.
For consistency, I think I will revise is_internal_unit to use the unit
number instead of a special bit. If this all tests OK I will commit to
trunk and wait a while for 4.1 branch.
Disregard this last thought on changing is_internal_unit to use the unit number.
The reason it is using a special bit now is that when I tried this before, the
test case negative_unit.f failed. That test attempts to open a negative unit
which then is mistaken for an internal unit and it all fails.
So the only change from the original patch is to set the default unit number for
internal units to -1. I will proceed with this commit later this evening.
Let me know if anyone has any other issues.
Regards,
Jerry