http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47710
Summary: [OOP] Improve ambiguity check for TBP Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: ja...@gcc.gnu.org http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/9a2837d8aee4e38c There is potentially a problem with the ambiguity check for TBP of the form procedure, nopass :: baseproc_nopass => baseproc procedure, pass :: baseproc_pass => baseproc That is: Both TBP point to the same procedure, though through the PASS and NOPASS they should be distinguishable. It is a bit unclear whether this is valid - also Richard Maine is confused ;-) One might want to ask at J3 - maybe up to an interpretation request. * * * Janus' example (cf. also below) should be truly ambiguous: module mod type base_t contains procedure, nopass :: baseproc_nopass => baseproc1 procedure, pass :: baseproc_pass => baseproc2 generic :: some_proc => baseproc_pass, baseproc_nopass end type contains subroutine baseproc1 (this) class(base_t) :: this print *, 'baseproc1' end subroutine subroutine baseproc2 (this,that) class(base_t) :: this, that print *, 'baseproc2' end subroutine end module program p use mod type(base_t) :: t call t%some_proc(t) ! ambiguous!!! end program