http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47352
Summary: ICE with proc-pointers in generic procedures Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: ja...@gcc.gnu.org Found at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/bbaf59ffd7c372e9# (There is another issue in that thread) The following program causes an ICE with gfortran in: ==779== Invalid read of size 1 ==779== at 0x58B717: gfc_conv_expr_reference (trans-expr.c:4839) ==779== by 0x5A400B: gfc_trans_transfer (trans-io.c:2328) ==779== by 0x565607: trans_code (trans.c:1371) Reduced (and w/o comments) full test case: 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 procedure(f),pointer,save :: f1 ! procedure(g),pointer,save :: g1 interface gen procedure f1!,g1 end interface gen 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 ! f1 => f2 ! g1 => g2 ! write(*,*) gen(1) write(*,*) gen(1.0) end program test