URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_usage_8.f03] - Rev 700
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do compile }! This should compile, though there is a warning about the type of len! (return variable of strlen()) for being implicit.! PR fortran/32797!MODULE ISO_C_UTILITIESUSE ISO_C_BINDINGimplicit noneCHARACTER(C_CHAR), DIMENSION(1), SAVE, TARGET, PRIVATE :: dummy_string="?"CONTAINSFUNCTION C_F_STRING(CPTR) RESULT(FPTR)use, intrinsic :: iso_c_bindingTYPE(C_PTR), INTENT(IN) :: CPTR ! The C addressCHARACTER(KIND=C_CHAR), DIMENSION(:), POINTER :: FPTRINTERFACEFUNCTION strlen(string) RESULT(len) BIND(C,NAME="strlen") ! { dg-warning "Implicitly declared" }USE ISO_C_BINDINGTYPE(C_PTR), VALUE :: string ! A C pointerEND FUNCTIONEND INTERFACECALL C_F_POINTER(FPTR=FPTR, CPTR=CPTR, SHAPE=[strlen(CPTR)])END FUNCTIONEND MODULE ISO_C_UTILITIES! { dg-final { cleanup-modules "iso_c_utilities" } }
Go to most recent revision | Compare with Previous | Blame | View Log
