[Patch, Fortran, F03] PR 40870: include formal args in backend_decl of PPCs

Janus Weil janus@gcc.gnu.org
Wed Aug 5 08:51:00 GMT 2009


Paul,

> Aahhh!  That's because it's so good that it's invisible.  For lesser
> mortals that can't deal with the latest technology, please find the
> diff attached.

I think your patch effectively does pretty much the same as mine (even
though mine lacks the invisibility mode ;), but your version is
probably safer against regressions, since it's guarded by an
additional check for derived->attr.proc_pointer_comp.

Btw, I found another minor flaw in my patch, concerning cases like
"procedure(integer), pointer, nopass".

Updated patch (based on Paul's version) is attached. Ok to commit
after another regtest?

Cheers,
Janus


2009-08-05  Janus Weil  <janus@gcc.gnu.org>
	    Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/40870
	* trans-types.c (gfc_get_ppc_type): Include formal args in backend_decl
	using the interface symbol.
	(gfc_get_derived_type): Prevent infinite recursion loop
	if a PPC has a derived-type formal arg.

2009-08-05  Janus Weil  <janus@gcc.gnu.org>
	    Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/40870
	* gfortran.dg/proc_ptr_comp_13.f90: Extended.



> On Tue, Aug 4, 2009 at 3:17 PM, Janus Weil<janus@gcc.gnu.org> wrote:
>> 2009/8/4 Paul Richard Thomas <paul.richard.thomas@gmail.com>:
>>>> Well, in principle you're right: Usually one should test for
>>>> TYPE_FIELDS. However, in this case I think it's not possible, because
>>>> the fields have not been built yet. Here's an example:
>>>
>>> Indeed!  That was the idea behind the modified patch that I attached.
>>
>> Sorry, I think the attachment was missing?!?
>>
>> Cheers,
>> Janus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr40870_new.diff
Type: text/x-diff
Size: 2686 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090805/9a69b83b/attachment.bin>


More information about the Fortran mailing list