PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / interop_params.f03
blob6eafba0ea6933ded132fcd0541c86d450e35bae8
1 ! { dg-do compile }
2 ! { dg-options "-Wc-binding-type" }
3 module interop_params
4 use, intrinsic :: iso_c_binding
6 type my_f90_type
7    integer :: i
8    real :: x
9 end type my_f90_type
11 contains
12   subroutine test_0(my_f90_int) bind(c) ! { dg-warning "may not be C interoperable" }
13     use, intrinsic :: iso_c_binding
14     integer, value :: my_f90_int 
15   end subroutine test_0
17   subroutine test_1(my_f90_real) bind(c)
18     real(c_int), value :: my_f90_real    ! { dg-warning "is for type INTEGER" }
19   end subroutine test_1
21   subroutine test_2(my_type) bind(c) ! { dg-error "is not C interoperable" }
22     use, intrinsic :: iso_c_binding
23     type(my_f90_type) :: my_type 
24   end subroutine test_2
25 end module interop_params