Debian Codegraph @

gcc/testsuite/gfortran.dg/c-interop/pr103390-7.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, and
6 ! that it does not ICE.
7
8 program p
9 integer, pointer :: z(:)
10 integer :: A(5) = [1, 2, 3, 4, 5]
11 call s(A(::2))
12 contains
13 subroutine s(x) bind(c)
14 integer, contiguous :: x(:)
15 end
16 end
17
18 ! Expect copy loops before and after the call to S.
19 ! { dg-final { scan-tree-dump-times "while \\(1\\)" 2 "original" } }