Debian Codegraph @

gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-fdump-tree-original" }
3 !
4 ! Check that copy loops to ensure contiguity of the result of an array
5 ! section expression are generated properly after fixing pr103390,
6 ! and that it does not ICE. This case is for an intent(in)
7 ! dummy so no copy-out should occur, only copy-in.
8
9 program p
10 integer, pointer :: z(:)
11 integer, parameter :: A(5) = [1, 2, 3, 4, 5]
12 call s(A(::2))
13 contains
14 subroutine s(x) bind(c)
15 integer, contiguous, intent(in) :: x(:)
16 end
17 end
18
19 ! Expect a copy loop before the call to S.
20 ! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } }