Related to PR 47352. Both where reported by James in the same thread: http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/bbaf59ffd7c372e9 The program in question fails with GENERIC :: gen => f1, g1 1 Error: Undefined specific binding 'g1' as target of GENERIC 'gen' at (1) At a glance, the program looks as if it could be valid - though also Crayftn does not like it (ifort 11 and NAG f95 5.1 do not support GENERIC, yet). module mytypes implicit none abstract interface function f(x) real f, x end function f function g(x) integer g, x end function g end interface type T procedure(f),pointer,NOPASS :: f1 procedure(g),pointer,NOPASS :: g1 contains GENERIC :: gen => f1, g1 end type T end module mytypes module funcs implicit none contains function f(x) real f, x f = 3*x end function f function g(x) integer g, x g = 3*x end function g end module funcs program test use mytypes use funcs, f2=>f, g2=>g implicit none type(T) tau tau%f1 => f2 tau%g1 => g2 write(*,*) tau%gen(1) write(*,*) tau%gen(1.0) end program test
"R450 type-bound-generic-stmt is GENERIC [ , access-spec ] :: generic-spec => binding-name-list" "C467 (R450) Each binding-name in binding-name-list shall be the name of a specific binding of the type." "1.3.13 binding name: name given to a specific or generic type-bound procedure in the type definition (4.5.5)" And in 4.5.5: "R447 type-bound-proc-binding is type-bound-procedure-stmt or type-bound-generic-stmt or final-procedure-stmt" Hence, the example seems to be invalid as "f1" and "g1" are not type-bound procedures. -> Close PR.