Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90

raw
1 ! { dg-do run }
2 !
3 ! PR fortran/107441
4 ! Check that with -fcoarray=lib, coarray metadata arguments are passed
5 ! in the right order to procedures.
6 !
7 ! Contributed by M.Morin
8
9 program p
10 integer :: ci[*]
11 ci = 17
12 call s(1, ci, "abcd")
13 contains
14 subroutine s(ra, ca, c)
15 integer :: ra, ca[*]
16 character(*) :: c
17 ca[1] = 13
18 if (ra /= 1) stop 1
19 if (this_image() == 1) then
20 if (ca /= 13) stop 2
21 else
22 if (ca /= 17) stop 3
23 end if
24 if (len(c) /= 4) stop 4
25 if (c /= "abcd") stop 5
26 end subroutine s
27 end program p