This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libgfortran] PR78854 [F03] DTIO namelist output not working on internal unit
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Jerry DeLisle <jvdelisle at charter dot net>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 11 Mar 2017 10:49:42 +0000
- Subject: Re: [patch, libgfortran] PR78854 [F03] DTIO namelist output not working on internal unit
- Authentication-results: sourceware.org; auth=none
- References: <10edb617-84db-b2f6-4ccb-50a8734208df@charter.net>
Hi Jerry,
This is OK for trunk.
Thanks for doing this. Hopefully we will have a really good
implementation of UD-DTIO in time for the release of 7.1.
I am progressing through submodule bugs for the same reason.
Cheers
Paul
On 10 March 2017 at 18:17, Jerry DeLisle <jvdelisle@charter.net> wrote:
> Hi all,
>
> The attached patch fixes this PR by properly stashing the internal unit
> created by parent so that it may be correctly accessed by the child DTIO
> procedure.
>
> Note the included test case. The Fortran Standard requires that the iotype
> be passed to the child routine so that it is aware of what the intended
> purpose is. In the case of namelist I/O the iotype is set to "NAMELIST".
> It is up to the user to program the child procedure to look for that and do
> the right thing for namelists to work correctly. If a user chooses to
> ignore this feature, so be it, but tough luck if things don't work as
> "expected".
>
> There are some other DTIO bugs related to this one. Once I get this patch in
> I will be able to address those more specifically.
>
> Regression tested on x86_64.
>
> OK for trunk?
>
> Regards,
>
> Jerry
>
> 2017-03-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
>
> PR libgfortran/78854
> * io/list_read.c (nml_get_obj_data): Stash internal unit for
> later use by child procedures.
> * io/write.c (nml_write_obj): Likewise.
> * io/tranfer.c (data_transfer_init): Minor whitespace.
> * io/unit.c (set_internal_uit): Look for the stashed internal
> unit and use it if found.
>
> 2017-03-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
>
> PR libgfortran/78854
> * gfortran.dg/dtio_25.f90: New test.
--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein