------- Comment #2 from brtnfld at hdfgroup dot org 2010-08-09 15:02 ------- If the type declaration is moved to the module scope the code compiles.
MODULE liter_cb_mod USE ISO_C_BINDING TYPE, BIND(C) :: MYFTYPE INTEGER(C_INT) :: I, J REAL(C_FLOAT) :: S END TYPE MYFTYPE CONTAINS FUNCTION liter_cb() bind(C) USE ISO_C_BINDING IMPLICIT NONE INTEGER(c_int) liter_cb TYPE(MYFTYPE) :: link_info liter_cb = 0 END FUNCTION liter_cb END MODULE liter_cb_mod There was a discussion about the matter in comp.lang.fortran under the topic "BIND(C) functions in a module error" as to the source of the problem. Since there seems to be a work around I downgraded the severity. -- brtnfld at hdfgroup dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45211