http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47360
Summary: GENERIC with proc-pointer components as specific functions Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org 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