URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [bind_c_dts_2.f03] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do run }! { dg-additional-sources bind_c_dts_2_driver.c }module bind_c_dts_2use, intrinsic :: iso_c_bindingimplicit nonetype, bind(c) :: my_c_type_0integer(c_int) :: itype(c_ptr) :: nested_c_addressinteger(c_int) :: array(3)end type my_c_type_0type, bind(c) :: my_c_type_1type(my_c_type_0) :: my_nested_typetype(c_ptr) :: c_addressinteger(c_int) :: jend type my_c_type_1containssubroutine sub0(my_type, expected_i, expected_nested_c_address, &expected_array_1, expected_array_2, expected_array_3, &expected_c_address, expected_j) bind(c)type(my_c_type_1) :: my_typeinteger(c_int), value :: expected_itype(c_ptr), value :: expected_nested_c_addressinteger(c_int), value :: expected_array_1integer(c_int), value :: expected_array_2integer(c_int), value :: expected_array_3type(c_ptr), value :: expected_c_addressinteger(c_int), value :: expected_jif (my_type%my_nested_type%i .ne. expected_i) thencall abort ()end ifif (.not. c_associated(my_type%my_nested_type%nested_c_address, &expected_nested_c_address)) thencall abort ()end ifif (my_type%my_nested_type%array(1) .ne. expected_array_1) thencall abort ()end ifif (my_type%my_nested_type%array(2) .ne. expected_array_2) thencall abort ()end ifif (my_type%my_nested_type%array(3) .ne. expected_array_3) thencall abort ()end ifif (.not. c_associated(my_type%c_address, expected_c_address)) thencall abort ()end ifif (my_type%j .ne. expected_j) thencall abort ()end ifend subroutine sub0end module bind_c_dts_2! { dg-final { cleanup-modules "bind_c_dts_2" } }
