| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR fortran/55343 |
| 4 |
! |
| 5 |
! Contributed by Janus Weil |
| 6 |
! |
| 7 |
module my_mod |
| 8 |
implicit none |
| 9 |
type int_type |
| 10 |
integer :: i |
| 11 |
end type int_type |
| 12 |
end module my_mod |
| 13 |
program main |
| 14 |
use iso_c_binding, only: C_void_ptr=>C_ptr, C_string_ptr=>C_ptr |
| 15 |
use my_mod, only: i1_type=>int_type, i2_type=>int_type |
| 16 |
implicit none |
| 17 |
type(C_string_ptr) :: p_string |
| 18 |
type(C_void_ptr) :: p_void |
| 19 |
type (i1_type) :: i1 |
| 20 |
type (i2_type) :: i2 |
| 21 |
p_void = p_string |
| 22 |
i1 = i2 |
| 23 |
end program main |