On 06/17/2012 11:22 PM, Janus Weil wrote:
Updated patch: After fixing two small errors, the patch also fixes PR
47710 (test case added).
Thanks for the patch! It is okay, but I have a few nits:
+ by this test. This subroutine implements rule 1 of section
+ F03:16.2.3 in the Fortran 95 standard. */
Is that now the F03 or F95 rule? (Side remark: I prefer F2003 or
"Fortran 2003" to F03, but that's personal style.)
Could you add a few comments what p1 and p2 does? Namely in the comment
block before count_types_test; and before generic_correspondence and/or
before the strcmp in that function.
I tried to find a case, which your patch misses but as type-bound
operators/assignment have to be PASS and as type-bound generic names do
not seem to end up as procedure names, I think your patch handles that
correctly. Only when mixing INTERFACE and type-bound procedures, there
is a problem (accepts invalid), but that's independent of your patch;
cf. PR 41951.
Tobias
2012-06-17 Janus Weil <ja...@gcc.gnu.org>
PR fortran/47710
PR fortran/53328
* interface.c (count_types_test,generic_correspondence,
gfc_compare_interfaces): Ignore PASS arguments.
(check_interface1,compare_parameter): Pass NULL arguments to
gfc_compare_interfaces.
* gfortran.h (gfc_compare_interfaces): Modified Prototype.
* expr.c (gfc_check_pointer_assign): Pass NULL arguments to
gfc_compare_interfaces.
* resolve.c (resolve_structure_cons): Ditto.
(check_generic_tbp_ambiguity): Determine PASS arguments and pass them
to gfc_compare_interfaces.
2012-06-17 Janus Weil <ja...@gcc.gnu.org>
PR fortran/47710
PR fortran/53328
* gfortran.dg/typebound_generic_12.f03: New.
* gfortran.dg/typebound_generic_13.f03: New.
2012/6/17 Janus Weil <ja...@gcc.gnu.org>:
Hi all,
here is a patch which concerns the ambiguity checking of generic TBPs,
where F03 has similar rules as F95, with the difference that PASS
arguments basically should be skipped in these tests. That is what the
patch implements by passing the PASS arguments to
'gfc_compare_interfaces' and modifying the helper functions
'count_types_test' and 'generic_correspondence'.
Patch is regtested on x86_64-unknown-linux-gnu. I also checked that it
gives correct behavior for the extended tests posted by Salvatore at:
http://gcc.gnu.org/ml/fortran/2012-05/msg00060.html
Ok for trunk?
Btw, we have a couple more PRs regarding generic TBPs, and I hope to
find the time to tackle some of these soon.
Cheers,
Janus
2012-06-17 Janus Weil <ja...@gcc.gnu.org>
PR fortran/53328
* interface.c (count_types_test,generic_correspondence,
gfc_compare_interfaces): Ignore PASS arguments.
(check_interface1,compare_parameter): Pass NULL arguments to
gfc_compare_interfaces.
* gfortran.h (gfc_compare_interfaces): Modified Prototype.
* expr.c (gfc_check_pointer_assign): Pass NULL arguments to
gfc_compare_interfaces.
* resolve.c (resolve_structure_cons): Ditto.
(check_generic_tbp_ambiguity): Determine PASS arguments and pass them
to gfc_compare_interfaces.
2012-06-17 Janus Weil <ja...@gcc.gnu.org>
PR fortran/53328
* gfortran.dg/typebound_generic_12.f03: New.