http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47023
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janus at gcc dot gnu.org --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-22 10:28:28 UTC --- The reason for rejecting it is: if (verify_c_interop (&arg->ts) != SUCCESS) { gfc_error ("'%s' argument of '%s' intrinsic at %L must be be an " "interoperable data entity", If one looks at decl.c, one see that the check makes only sense for BT_DERIVED - but not for intrinsic variables. In decl.c one afterwards prints only an error for BT_DERIVED - otherwise only a warning is printed (which does not make sense here). And there is additionally a check for string-length == 1. * * * In decl.c, I think one should additionally check for BT_CLASS and reject the following program (currently there is just a "may not be C interoperable" warning as it is not BT_DERIVED). module m use iso_c_binding type t integer(c_int) :: i end type t contains subroutine test(a) bind(c) class(t) :: a end subroutine end