[Patch, Fortran] PR fortran/37588: GENERIC resolution broken for array arguments

Daniel Kraft d@domob.eu
Tue Sep 23 09:36:00 GMT 2008


Daniel Kraft wrote:
> Hi Tobias,
> 
> thanks for the quick review!  Thinking about it, however, I found the 
> following test still fails and I guess it should be valid:
> 
[example program typebound_generic_5.f03 from the patch]
> 
> The problem is that ELEMENTAL procedures are not recognized correctly 
> because ranks_must_agree is set to constant true in the call to 
> gfc_compare_actual_formal (I thought that passing the elemental-flag 
> itself would be enough but it seems those two parameters must be set to 
> complementary values; doesn't make sense to me, though).

The attached extended patch fixes this problem, too.  I made 
gfc_compare_actual_formal static again and introduced a new checking 
method instead to compare an actual arglist against a procedure symbol, 
taking into account the ELEMENTAL attribute.  I also had to add a 
missing type-spec initialization in resolve_compcall.

No regressions with the new patch on GNU/Linux-x86-32.  Is this ok to 
commit, too?

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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.changelog
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080923/5672c801/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080923/5672c801/attachment-0001.ksh>


More information about the Fortran mailing list