comparison gcc/testsuite/gfortran.dg/assumed_rank_19.f90 @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
18:1830386684a0 19:2b5abeee2509
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