[patch, libgfortran] PR78881 [F03] reading from string with DTIO procedure does not work properly

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Mar 25 18:49:00 GMT 2017


Hi Jerry,

This looks fine to me. OK for trunk.

Thanks for the patch.

Paul

On 25 March 2017 at 13:41, Jerry DeLisle <jvdelisle@charter.net> wrote:
> Hi all,
>
> I managed to figure out the rest of this.
>
> Attached is updated full patch. I consolidated the two previous test cases
> into one which checks all four conditions I was concerned with.
>
> Regression tested on x86_64_linux.
>
> Ok for trunk?
>
> Regards,
>
> Jerry
>
> 2017-03-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
>
>         PR libgfortran/78881
>         * io/io.h (st_parameter_dt): Rename unused component last_char to
>         child_saved_iostat. Move comment to gfc_unit.
>         * io/list_read.c (list_formatted_read_scalar): After call to
>         child READ procedure, save the returned iostat value for later
>         check. (finish_list_read): Only finish READ if child_saved_iostat
>         was OK.
>         * io/transfer.c (read_sf_internal): If there is a saved character
>         in last character, seek back one. Add a new check for EOR
>         condition. (read_sf): If there is a saved character
>         in last character, seek back one. (formatted_transfer_scalar_read):
>         Initialize last character before invoking child procedure.
>         (data_transfer_init): If child dtio, set advance
>         status to nonadvancing. Move update of size and check for EOR
>         condition to before child dtio return.
>
> Changelog for test case will be added.



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein



More information about the Gcc-patches mailing list