[Patch, Fortran] PR fortran/37199: Wrong code for function returning array

Daniel Kraft d@domob.eu
Thu Sep 11 19:15:00 GMT 2008


Paul Richard Thomas wrote:
> 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.

Committed to 4.3 as revision 140296.  Closing the PR.

Thanks again,
Daniel

> 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
>>>
>>
> 
> 
> 


-- 
Done:     Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go:    Hea-Kni-Mon-Pri-Ran-Rog-Tou



More information about the Fortran mailing list