------- Comment #2 from janus at gcc dot gnu dot org 2008-06-29 08:58 ------- The test case in comment #1 does compile for me without any ICE. The test case in comment #0 is actually invalid, triggering the following error message:
procedure(abstract_fun) fun 1 Error: PROCEDURE at (1) must be in a generic interface One simply has to remove the interface statement from the main program: program fptr use funcs use other_fun implicit none procedure(abstract_fun) fun pointer(p,fun) type(C_FUNPTR) fp fp = get_proc('Hello, world'//achar(0)) p = transfer(fp,p) write(*,'(a)') fun([1,2,3]) end program fptr With this I also get an ICE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35971