gcc/testsuite/gfortran.dg/lto/bind_c-5_0.f90
raw| 1 | ! { dg-lto-do run } |
| 2 | ! { dg-lto-options {{ -O3 -flto }} } |
| 3 | ! This testcase will abort if C_FUNPTR is not interoperable with both int * |
| 4 | ! and float * |
| 5 | module lto_type_merge_test |
| 6 | use, intrinsic :: iso_c_binding |
| 7 | implicit none |
| 8 | |
| 9 | type(c_funptr), bind(c, name="myVar") :: myVar |
| 10 | type(c_funptr), bind(c, name="myVar2") :: myVar2 |
| 11 | |
| 12 | contains |
| 13 | subroutine types_test() bind(c) |
| 14 | myVar = myVar2 |
| 15 | end subroutine types_test |
| 16 | end module lto_type_merge_test |
| 17 |