diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90 b/gcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90 new file mode 100644 index 0000000..23b2242 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/pr107441-caf.f90 @@ -0,0 +1,27 @@ +! { dg-do run } +! +! PR fortran/107441 +! Check that with -fcoarray=lib, coarray metadata arguments are passed +! in the right order to procedures. +! +! Contributed by M.Morin + +program p + integer :: ci[*] + ci = 17 + call s(1, ci, "abcd") +contains + subroutine s(ra, ca, c) + integer :: ra, ca[*] + character(*) :: c + ca[1] = 13 + if (ra /= 1) stop 1 + if (this_image() == 1) then + if (ca /= 13) stop 2 + else + if (ca /= 17) stop 3 + end if + if (len(c) /= 4) stop 4 + if (c /= "abcd") stop 5 + end subroutine s +end program p |