[Patch, Fortran] PR fortran/37199: Wrong code for function returning array
Paul Richard Thomas
paul.richard.thomas@gmail.com
Mon Sep 8 06:33:00 GMT 2008
Daniel,
When I wrote gfc_map_intrinsic_function, I completely forgot about
such simple safety nets:-( Would you cast a quick eye over the rest
of the function to see if any similar limits have been forgotten,
please? I don't think so but four eyes are better than two!
OK for trunk and 4.3, after the usual, decent interval.
Thanks for the patch - I wonder why the array_spec was not added to
new_sym in the first place?
Cheers
Paul
On Sun, Sep 7, 2008 at 10:23 PM, Daniel Kraft <d@domob.eu> wrote:
> Daniel Kraft wrote:
>>
>> Hi,
>>
>> this is a proposed fix for PR 37199 where gfortran produced wrong code for
>> a function returning an array. For details on the problem, see my comments
>> on the PR at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37199.
>>
>> This patch sets the array-spec on new_sym when doing interface-mapping and
>> I had to include an additional condition for remapping ISYM_SIZE's. I'm not
>> sure if there are other places where such a new condition would technically
>> be needed.
>>
>> I'm not really an expert on the code touched, though the fix looks more or
>> less good to me. No regressions on GNU/Linux-x86-32, as well as passing the
>> test from the PR of course. And additionally, with this patch the
>> HOPPET-package mentioned by the reporter now builds and runs the test-suite
>> fine (which it didn't do with gfortran 4.3.1 for me).
>>
>> What do you think about this fix, does it seem ok? Or should I try to
>> find some other patch?
>
> I forgot to mention: The XXX comments in the patch are marks I used while
> analysing the patch and left in for now. You can just ignore them, I'll
> remove them of course before committing if the patch is ok.
>
>> Yours,
>> Daniel
>>
>
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
More information about the Gcc-patches
mailing list