[gfortran,patch] Fix for PR 27478
THOMAS Paul Richard 169137
Paul.Richard.THOMAS@cea.fr
Tue Oct 3 11:06:00 GMT 2006
:REVIEWMAIL:
FX,
> The attached patch is a proposed fix for PR 27478. I think it's
> only a workaround for a middle-end bug, but I don't think there's
> any drawback to declaring this symbol addressable even if it's
> not stricly necessary.
I spent a bit of time this morning trying to supply the address to
DECL_RESULT but kept getting the likes of:
internal compiler error: in expand_expr_real_1, at expr.c:6882
Somebody more adept in these matters could undoubtedly get a result(!)
from this approach.
I also tried to do some of the obvious things in gfc_conv_expr_reference
but kept returning from gfc_conv_expr with the right TREE_TYPE and
a NULL expression.
Thus, forcing a memory location, using TREE_ADDRESSABLE, so that the
entry result variable can be addressed does seem to do the trick and
might even be strictly necessary!
> Bootstrapped and regtested on i686-linux. OK for mainline?
OK - it regtests for me too. Could you dejgnuify the reduced testcase
and submit that too, please?
> 2006-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
> PR middle-end/27478
> * trans-decl.c (gfc_get_fake_result_decl): Mark var as TREE_ADDRESSABLE.
Paul
More information about the Fortran
mailing list