This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR79382 - DTIO ICE
- 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>, Walt Brainerd <walt dot brainerd at gmail dot com>, Damian Rouson <damian at sourceryinstitute dot org>
- Date: Mon, 20 Feb 2017 10:54:44 +0000
- Subject: Re: [Patch, fortran] PR79382 - DTIO ICE
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiK0mEuN+hsJ4YU4B=xbJXPMateFX0xrCExVqAHrrJU6zA@mail.gmail.com> <1318714d-74f9-15e1-c05f-631f57ffd12c@charter.net>
Dear All,
Committed as revision 245596.
Thanks for the review.
Paul
On 16 February 2017 at 18:38, Jerry DeLisle <jvdelisle@charter.net> wrote:
> On 02/16/2017 03:31 AM, Paul Richard Thomas wrote:
>>
>> Dear All,
>>
>> The fix for the original bug is tested in dtio_24.f90. It is triggered
>> by the PRIVATE statement in the module and occurs because there is no
>> such generic interface in the module. Note, however, that there is a
>> typebound generic interface, which should not be affected by the
>> PRIVATE statement. The fix looks for the interface and issues an error
>> if it is not present.
>>
>> It was found that the absence of a DTIO procedure in a formatted
>> transfer, where a DT descriptor is present, caused a segfault. The fix
>> in transfer.c was to check if a reference to the DTIO procedure is
>> present and to issue an error if it is not. Unfortunately, since
>> trans-io.c transfers the components of derived types, in the absence
>> of a DTIO procedure, this negates the type check and requires that the
>> test in dtio_10.f90 be changed. I think that it would be a good idea
>> in the future to flag passing of components so that the type test can
>> be recovered. For this reason, I have left the calls in place.
>>
>> Bootstrapped and regtested on FC23/x86_64 - OK for trunk and 6-branch?
>
>
> OK for trunk. Not applicable for 6-branch
>>
>>
>> I am building up a backlog of approved patches: Including this one (if
>> approved :-) ), PRs79402, 79434 & 79447. Would it be OK to commit
>> these to trunk, even though it is in stage 4?
>
>
> Yes OK as long as we are not in freeze.
>
>
>>
>> Paul
>>
>> 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
>>
>> PR fortran/79382
>> * decl.c (access_attr_decl): Test for presence of generic DTIO
>> interface and emit error if not present.
>> (gfc_match_end): Catch case where a procedure is contained in
>> a module procedure and ensure that 'end procedure' is the
>> correct termination.
>>
>> 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
>>
>> PR fortran/79382
>> * io/transfer.c (check_dtio_proc): New function.
>> (formatted_transfer_scalar_read): Use it.
>> (formatted_transfer_scalar_write): ditto.
>>
>> 2017-02-16 Paul Thomas <pault@gcc.gnu.org>
>>
>> PR fortran/79382
>> * gfortran.dg/dtio_10.f90 : Change test of error message.
>> * gfortran.dg/dtio_23.f90 : New test.
>> * gfortran.dg/dtio_24.f90 : New test.
>>
>
--
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein