This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
On 08/05/2009 10:50 AM, Janus Weil wrote:
> Updated patch (based on Paul's version) is attached. Ok to commit
> after another regtest?
>
It looks OK, except I stumbled over:
+ /* Implicit interface (only return value may be known). */
if (c->attr.function && !c->attr.dimension)
[...]
+ t = gfc_typenode_for_spec (&c->ts);
else
t = void_type_node;
And wondered about the "dimension" attribute. And indeed, checking for
dimension is not enough as the following example shows:
module m
type :: t
procedure(character(len=5)), pointer, nopass :: ptr
end type
contains
function abc()
character(len=5) :: abc
abc = 'abcde'
end function abc
end module m
use m
type(t) :: x
character(len=5) :: str
x%ptr => abc
str = x%ptr()
end
That crashes with:
test.f90: In function 'MAIN__':
test.f90:12:0: internal compiler error: in gfc_conv_component_ref, at
fortran/trans-expr.c:477
You should check gfc_return_by_reference to recheck that no other
attributes/type-specs have been overlooked.
Tobias
- References:
- [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- From: Paul Richard Thomas
- Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- From: Paul Richard Thomas
- Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs
- From: Paul Richard Thomas
- Re: [Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs