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

Daniel Kraft d@domob.eu
Sun Sep 7 20:21:00 GMT 2008


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
> 



More information about the Fortran mailing list