Debian Codegraph @

gcc/testsuite/gfortran.dg/bind_c_usage_7.f03

raw
1 ! { dg-do compile }
2 module x
3 use iso_c_binding
4 implicit none
5 contains
6 function bar() bind(c) ! { dg-error "cannot be an array" }
7 integer(c_int) :: bar(5)
8 end function bar
9
10 function my_string_func() bind(c) ! { dg-error "must have length 1" }
11 character(kind=c_char, len=10) :: my_string_func
12 my_string_func = 'my_string' // C_NULL_CHAR
13 end function my_string_func
14 end module x