This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: PATCH ATTACHED Re: [PATCH, Fortran] PR78659 Spurious "requires DTIO" reported against namelist statement
- 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: Thu, 11 May 2017 18:17:12 +0100
- Subject: Re: PATCH ATTACHED Re: [PATCH, Fortran] PR78659 Spurious "requires DTIO" reported against namelist statement
- Authentication-results: sourceware.org; auth=none
- References: <5faf10d1-1b97-932e-5c2b-bbd666219497@charter.net> <0c648d00-15b2-bd24-77f0-7c1d192b4d7e@charter.net>
Hi Jerry,
This patch is good for both trunk and 7-branch.
Thanks!
Paul
On 11 May 2017 at 16:35, Jerry DeLisle <jvdelisle@charter.net> wrote:
> And the actual patch ...
>
> On 05/11/2017 08:30 AM, Jerry DeLisle wrote:
>>
>> Hi all,
>>
>> The attached patch fixes this issue by moving the DTIO namelist checks
>> from namelist resolution to READ/WRITE statement resolution. This allows
>> the checks to be specific to the io_kind. The dtio_procs_present function is
>> moved and modified to accept the io_kind as an argument and check for the
>> specific DTIO procedure.
>>
>> The original dtio_procs_present function also had a segfault for one of
>> the test cases because in the particular case the accessed structures do not
>> exist. This is prevented by adding the appropriate guarding to avoid memory
>> accesses to never never land.
>>
>> Several new test cases added. Regression tested on x86-64.
>>
>> OK for trunk. I would like to recommend back porting to 7 after allowing
>> some time for testing.
>>
>> Regards,
>>
>> Jerry
>>
>> 2017-05-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
>>
>> PR fortran/78659
>> * io.c (dtio_procs_present): Add new function to check for DTIO
>> procedures relative to I/O statement READ or WRITE.
>> (gfc_resolve_dt): Add namelist checks using the new function.
>> * resolve.c (dtio_procs_present): Remove function and related
>> namelist checks. (resolve_fl_namelist): Add check specific to
>> Fortran 95 restriction on namelist objects.
>
>
--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein