| 1 |
! { dg-do run } |
| 2 |
! |
| 3 |
! PR fortran/93957 |
| 4 |
! |
| 5 |
! Contributed by José Rui Faustino de Sousa |
| 6 |
|
| 7 |
function f_ice(this) result(that) bind(c) |
| 8 |
use, intrinsic :: iso_c_binding, only: c_int |
| 9 |
|
| 10 |
implicit none |
| 11 |
|
| 12 |
integer(kind=c_int), intent(in) :: this(..) |
| 13 |
integer(kind=c_int) :: that |
| 14 |
|
| 15 |
that = size(this) |
| 16 |
return |
| 17 |
end function f_ice |
| 18 |
|
| 19 |
program ice_p |
| 20 |
use, intrinsic :: iso_c_binding, only: c_int |
| 21 |
implicit none |
| 22 |
|
| 23 |
interface |
| 24 |
function f_ice(this) result(that) bind(c) |
| 25 |
use, intrinsic :: iso_c_binding, only: c_int |
| 26 |
integer(kind=c_int), intent(in) :: this(..) |
| 27 |
integer(kind=c_int) :: that |
| 28 |
end function f_ice |
| 29 |
end interface |
| 30 |
|
| 31 |
integer(kind=c_int), parameter :: n = 10 |
| 32 |
|
| 33 |
integer(kind=c_int) :: intp(n) |
| 34 |
|
| 35 |
if(size(intp)/=n) stop 1 |
| 36 |
if(f_ice(intp)/=n) stop 2 |
| 37 |
end program ice_p |