[Patch, Fortran] PR56138 - fix deferred-length character funcs w/o result variable
Paul Richard Thomas
paul.richard.thomas@gmail.com
Wed Jan 30 06:30:00 GMT 2013
Dear Tobias,
For a variety of reasons, I did not open my mailbox this morning but
got down to developing an almost identical fix and taking the PR!
Anyway, it would be best that you commit your fix, so it's OK for trunk.
Thanks
Paul
On 29 January 2013 23:36, Tobias Burnus <burnus@net-b.de> wrote:
> For allocatable string lengths (deferred length strings), the current code
> generates a local integer variable to which the the length is assigned.
>
> For some reason, that doesn't work for some functions which do not use a
> result variable - leading to failures as the pass-by-reference variable is
> not dereferenced. That's fixed by the attached patch. I have to admit that I
> do not understand why it works without the patch for the examples in
> gfortran.dg/allocatable_function_5.f90, where - for some tests - also no
> result variable is used.
>
> Build and regtested on x86-64-gnu-linux.
> OK for the trunk?
>
> Tobias
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
More information about the Fortran
mailing list