http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45521

--- Comment #6 from janus at gcc dot gnu.org 2012-04-19 13:04:18 UTC ---
(In reply to comment #5)
> "Two dummy arguments are distinguishable if
> - one is a procedure and the other is a data object,

Here is a test case for this item:


module m
  interface testIF
    module procedure :: test1
    module procedure :: test2
  end interface
contains
  real function test1 (obj)
    real :: obj
    test1 = obj
  end function
  real function test2 (obj)
    procedure(real) :: pr
    test2 = pr(0.)
  end function
end module

program test
  use m
  print *,testIF(2.0),testIF(cos)
end program



... which is currently rejected with:


    module procedure :: test2
                             1
Error: Ambiguous interfaces 'test2' and 'test1' in generic interface 'testif'
at (1)

Reply via email to