nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_funloc_tests_5.f03
blob1ebe14a70c29d679e7b3da57b71e3da01ce51895
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 "Fortran 2018: Noninteroperable procedure at .1. to C_FUNLOC" }
13     my_c_funptr = c_funloc(func0) ! { dg-error "Fortran 2018: 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