http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38894
--- Comment #9 from janus at gcc dot gnu.org 2012-04-25 20:19:42 UTC --- Combining comments #2 and #8 still produces testsuite failures: FAIL: gfortran.dg/c_ptr_tests_14.f90 -O0 (test for excess errors) FAIL: gfortran.dg/c_ptr_tests_15.f90 -O (test for excess errors) c_ptr_tests_14.f90:33.18: if(c_associated(file%gsl_func)) call abort() 1 Error: Type mismatch in argument 'c_ptr_1' at (1); passed TYPE(c_funptr) to TYPE(c_ptr) c_ptr_tests_14.f90:39.18: if(c_associated(file%gsl_func)) call abort() 1 Error: Type mismatch in argument 'c_ptr_1' at (1); passed TYPE(c_funptr) to TYPE(c_ptr) The problem seems to be that C_ASSOCIATED's formal args are TYPE(c_ptr), although c_ptr and c_funptr are allowed. We already build two versions of C_ASSOCIATED (with one and two arguments, respectively). Probably we need two more with c_funptr arguments.