* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_funloc_tests_5.f03
blob8c1843bdf1dd442403214d18162d946683780e06
1 ! { dg-do compile }
2 ! { dg-options "-std=f2003" }
3 ! Test that the arg checking for c_funloc verifies the procedures are 
4 ! C interoperable.
5 module c_funloc_tests_5
6   use, intrinsic :: iso_c_binding, only: c_funloc, c_funptr
7 contains
8   subroutine sub0() bind(c)
9     type(c_funptr) :: my_c_funptr
11     my_c_funptr = c_funloc(sub1) ! { dg-error "TS 29113/TS 18508: Noninteroperable procedure at .1. to C_FUNLOC" }
13     my_c_funptr = c_funloc(func0) ! { dg-error "TS 29113/TS 18508: Noninteroperable procedure at .1. to C_FUNLOC" }
14   end subroutine sub0
16   subroutine sub1() 
17   end subroutine sub1
19   function func0(desired_retval) 
20     use, intrinsic :: iso_c_binding, only: c_int
21     integer(c_int), value :: desired_retval
22     integer(c_int) :: func0
23     func0 = desired_retval
24   end function func0
25 end module c_funloc_tests_5