This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
Hi Paul,
> To make amends for what I can only describe as a brainstorm :-) ,
indeed, but a very constructive one :)
> 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?
> I have even written a code that made extensive use of dynamic dispatch
> of generic typebound procedures... I can't imagine what I have been
> thinking.
Don't worry, I guess everyone knows that feeling. In German there is a
common figure of speech for it ("auf dem Schlauch stehen"), which is
translated literally as "to be standing on a hose/tube" ;)
I hope the mentioned code works correctly with our patch?!?
Cheers,
Janus
> On 13 December 2016 at 06:33, Paul Richard Thomas
> <paul.richard.thomas@gmail.com> wrote:
>> Dear Janus,
>>
>> I woke up in the middle of the night realising that not only are you
>> right about the need for dynamic dispatch but that my dtio_20.f90 must
>> already work.
>>
>> Thanks for putting me right!
>>
>> Paul
>>
>> On 13 December 2016 at 00:30, Janus Weil <janus@gcc.gnu.org> wrote:
>>> Hi Paul, hi all,
>>>
>>> 2016-12-12 21:04 GMT+01:00 Janus Weil <janus@gcc.gnu.org>:
>>>> As commented several times in bugzilla, my feeling is that the
>>>> solution for this PR would be to utilize the vtable machinery, in
>>>> order to generate a truly polymorphic call to the DTIO procedure.
>>>
>>> in order to elaborate what I have in mind, I'm attaching a draft patch
>>> which implements polymorphic DTIO in the most straightforward manner I
>>> could come up with. I have not regtested it yet, but at least it
>>> removes the link failure on comment 0 and 6 in the PR and most
>>> importantly it generates the correct output for comment 18, which none
>>> of the previous attempts have accomplished.
>>>
>>> I'd be grateful for any comments, in particular whether I'm on the
>>> right track here or whether I'm misinterpreting the F03 standard in
>>> any way ...
>>>
>>> (Btw, it seems that Paul's dtio_20.f90 works already on current trunk,
>>> so it's not very well suited to test for the problem at hand.)
>>>
>>> Cheers,
>>> Janus
>>>
>>> PS: A quick check of the dtio_* tests shows ICEs on dtio_7.f90 and
>>> dtio_13.f90. I'll look into those tomorrow.
>>
>>
>>
>> --
>> If you're walking down the right path and you're willing to keep
>> walking, eventually you'll make progress.
>>
>> Barack Obama
>
>
>
> --
> If you're walking down the right path and you're willing to keep
> walking, eventually you'll make progress.
>
> Barack Obama
- References:
- [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
- From: Paul Richard Thomas
- Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
- Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
- Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
- From: Paul Richard Thomas
- Re: [Patch, fortran] PR78737 - [OOP] linking error with deferred, undefined user-defined derived-type I/O
- From: Paul Richard Thomas