hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
[official-gcc.git] / gcc / testsuite / gfortran.dg / ISO_Fortran_binding_18.f90
blob76be51d22fb7e850345d36182d8b8bddd1c1937f
1 ! { dg-do run }
2 ! { dg-additional-sources ISO_Fortran_binding_18.c }
4 module fortran_binding_test_18
5 use iso_c_binding
6 implicit none
7 contains
9 subroutine test(array)
10 integer(c_int) :: array(:)
11 array = 1
12 end subroutine
14 function do_loop(array) result(the_sum) bind(c)
15 integer(c_int), intent(in out) :: array(:,:,:)
16 integer(c_int) :: the_sum, i, j
18 the_sum = 0
19 array = 0
20 do i=1,size(array,3)
21 do j=1,size(array,2)
22 call test(array(:,j,i))
23 end do
24 end do
25 the_sum = sum(array)
26 end function
28 end module