https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109358
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jerry DeLisle <jvdeli...@gcc.gnu.org>: https://gcc.gnu.org/g:d85a658402d5433ff223ce8f4e70174ed8a20428 commit r13-8322-gd85a658402d5433ff223ce8f4e70174ed8a20428 Author: Jerry DeLisle <jvdeli...@gcc.gnu.org> Date: Mon Feb 12 13:12:08 2024 -0800 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. PR libgfortran/109358 libgfortran/ChangeLog: * io/transfer.c (formatted_transfer_scalar_write): Adjust bytes_used and pos variable for stream access. gcc/testsuite/ChangeLog: * gfortran.dg/pr109358.f90: New test. (cherry picked from commit 153ce7a78edbe339fa0b1cd314dea0554f59faf0)