OSDN Git Service

2008-02-21 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / interop_params.f03
1 ! { dg-do compile }
2 module interop_params
3 use, intrinsic :: iso_c_binding
4
5 type my_f90_type
6    integer :: i
7    real :: x
8 end type my_f90_type
9
10 contains
11   subroutine test_0(my_f90_int) bind(c) ! { dg-warning "may not be C interoperable" }
12     use, intrinsic :: iso_c_binding
13     integer, value :: my_f90_int 
14   end subroutine test_0
15
16   subroutine test_1(my_f90_real) bind(c) ! { dg-error "is for type INTEGER" } 
17     real(c_int), value :: my_f90_real 
18   end subroutine test_1
19
20   subroutine test_2(my_type) bind(c) ! { dg-error "is not C interoperable" }
21     use, intrinsic :: iso_c_binding
22     type(my_f90_type) :: my_type 
23   end subroutine test_2
24 end module interop_params