annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 ! { dg-do run }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 !
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 ! PR fortran/93957
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 !
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 ! Contributed by José Rui Faustino de Sousa
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 function f_ice(this) result(that) bind(c)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 use, intrinsic :: iso_c_binding, only: c_int
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 implicit none
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 integer(kind=c_int), intent(in) :: this(..)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 integer(kind=c_int) :: that
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 that = size(this)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 return
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 end function f_ice
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 program ice_p
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 use, intrinsic :: iso_c_binding, only: c_int
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 implicit none
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 interface
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 function f_ice(this) result(that) bind(c)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 use, intrinsic :: iso_c_binding, only: c_int
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 integer(kind=c_int), intent(in) :: this(..)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 integer(kind=c_int) :: that
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 end function f_ice
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29 end interface
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 integer(kind=c_int), parameter :: n = 10
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 integer(kind=c_int) :: intp(n)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
35 if(size(intp)/=n) stop 1
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
36 if(f_ice(intp)/=n) stop 2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
37 end program ice_p