Hi Jerry.
Am 12.02.24 um 22:28 schrieb Jerry D:
The attached patch fixes this PR by properly adjusting some variables
When using stream io. See log below. New test case included.
Regression tested on x86_64.
OK for trunk and backport?
the patch looks good to me.
As it is simple and very local, feel free to backport at your
discretion.
Thanks for the patch!
Harald
Regards,
Jerry
ChangeLog:
libgfortran: Adjust bytes_left and pos for access="STREAM".
During tab edits, the pos (position) and bytes_used
Variables were not being set correctly for stream I/O.
Since stream I/O does not have 'real' records, the
format buffer active length must be used instead of
the record length variable.
libgfortran/ChangeLog:
PR libgfortran/109358
* io/transfer.c (formatted_transfer_scalar_write): Adjust
bytes_used and pos variable for stream access.
gcc/testsuite/ChangeLog:
PR libgfortran/109358
* gfortran.dg/pr109358.f90: New test.