This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, Damian Rouson <damian at sourceryinstitute dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Dec 2016 10:29:50 +0000
- Subject: Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiLsoE1AUv99QbAccGDu-OOiSsB31t2exFumQkPgchGeuA@mail.gmail.com> <CAKwh3qg=WX8iLG0E4iBVpixRuiwvckSwf8n8g8_dvnCsWBXemQ@mail.gmail.com> <CAKwh3qgGcE5HvbAqKBTgKN2bYAoHNxs4Zu8FoVqUNZ7_uyXb+w@mail.gmail.com> <CAGkQGiL5sjUctXN4gE51ptkFfNM7ucttpphCTP42bq325hQsvg@mail.gmail.com> <CAGkQGiJmyZPaCQKjFb2i_XWdAMigNBjeNcNMjgVHM71b_Q=3GA@mail.gmail.com> <CAKwh3qh7h0UW7pe8-Y2Ky3xQwaAyDuv4UJJkYDs=dNkGQuGG0A@mail.gmail.com> <CAKwh3qijXRU8PJoUNn1xz0pVYOF0LsGVL7=3Gw8wEaLuqPLqwg@mail.gmail.com> <CAKwh3qgDF5mScHa26J=DePM52-B91wOA9wqgt+7yb1ESkaoT_w@mail.gmail.com>
Dear Janus,
We got there! OK for trunk.
This was a demonstration of the corollary of the "bon mot" from Barack
Obama at the end of the message :-)
Many thanks for finding the right path.
Paul
On 13 December 2016 at 10:23, Janus Weil <janus@gcc.gnu.org> wrote:
> 2016-12-13 10:58 GMT+01:00 Janus Weil <janus@gcc.gnu.org>:
>> 2016-12-13 10:42 GMT+01:00 Janus Weil <janus@gcc.gnu.org>:
>>>> please find attached a version of your patch that runs all the dtio
>>>> testcases successfully.
>>>
>>> Great, thanks a lot. Your addition of
>>> gfc_find_and_cut_at_last_class_ref is just what I was looking for
>>> right now ...
>>>
>>> If you don't mind I'll write a ChangeLog, add the proper tests and
>>> commit to trunk. Or do you prefer to take care of it yourself?
>>
>> Btw, to continue the brainstorming, I think I found a slightly better
>> solution for the dtio_13 problem, which even removes the spurious
>> error on that test case via a small fix in resolve_transfer. The
>> attached patch is what I'd like to commit if you're ok with it.
>
> Finally, here is a complete patch, including testcase and ChangeLog
> entries. Ok for trunk?
>
> Cheers,
> Janus
>
>
> 2016-12-13 Janus Weil <janus@gcc.gnu.org>
> Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/78737
> * gfortran.h (gfc_find_typebound_dtio_proc): New prototype.
> * interface.c (gfc_compare_interfaces): Whitespace fix.
> (gfc_find_typebound_dtio_proc): New function.
> (gfc_find_specific_dtio_proc): Use it.
> * resolve.c (resolve_transfer): Improve error recovery.
> * trans-io.c (get_dtio_proc): Implement polymorphic calls to DTIO
> procedures.
>
> 2016-12-13 Janus Weil <janus@gcc.gnu.org>
> Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/78737
> * gfortran.dg/dtio_13.f90: Remove spurious error.
> * gfortran.dg/dtio_19.f90: New test case.
--
If you're walking down the right path and you're willing to keep
walking, eventually you'll make progress.
Barack Obama