blob: f178bb8d73321a0f2ea5c0022cb8c26a01f0992f [file] [log] [blame]
! PR92482
! { dg-do run }
! { dg-additional-sources "cf-descriptor-5-c.c dump-descriptors.c" }
! { dg-additional-options "-g" }
! This program checks that building a descriptor for a character object
! in C works and that you can use it to call back into a Fortran function
! with an assumed-length dummy that is declared with C binding.
subroutine ftest (a, n) bind (c, name="ftest") ! { dg-bogus "Sorry" "pr92482" { xfail *-*-* } }
use iso_c_binding
character(kind=C_CHAR, len=*) :: a
integer(C_INT), value :: n
if (len (a) .ne. n) stop 101
end subroutine
program testit
use iso_c_binding
implicit none
subroutine ctest (n) bind (c)
use iso_c_binding
integer(C_INT), value :: n
end subroutine
end interface
call ctest (42)
end program