Debian Codegraph @

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

raw
1 ! { dg-do run }
2 ! { dg-options "-fdump-tree-original" }
3 !
4 ! Check that copy loops to ensure contiguity of transpose result are
5 ! still generated after fixing pr103390, and that it does not ICE.
6
7 program p
8 integer, pointer :: z(:,:)
9 integer, target :: x(3,3) = reshape ([1, 2, 3, 4, 5, 6, 7, 8, 9], shape(x))
10 z => x
11 call s(transpose(z))
12 contains
13 subroutine s(x) bind(c)
14 integer, contiguous :: x(:,:)
15 end
16 end
17
18 ! Expect 2 nested copy loops both before and after the call to S.
19 ! { dg-final { scan-tree-dump-times "while \\(1\\)" 4 "original" } }
20