PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_loc_test_22.f90
blob5f4f9775b4a4d08198683c4ba039175e6f586389
1 ! { dg-do compile }
2 ! { dg-options "-fdump-tree-original" }
4 ! PR fortran/56907
6 subroutine sub(xxx, yyy)
7 use iso_c_binding
8 implicit none
9 integer, target, contiguous :: xxx(:)
10 integer, target :: yyy(:)
11 type(c_ptr) :: ptr1, ptr2, ptr3, ptr4
12 ptr1 = c_loc (xxx)
13 ptr2 = c_loc (xxx(5:))
14 ptr3 = c_loc (yyy)
15 ptr4 = c_loc (yyy(5:))
16 end
17 ! { dg-final { scan-tree-dump-not " _gfortran_internal_pack" "original" } }
18 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.xxx.\[0-9\]+\\)\\\[0\\\];" 1 "original" } }
19 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.xxx.\[0-9\]+\\)\\\[D.\[0-9\]+ \\* 4\\\];" 1 "original" } }
20 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.yyy.\[0-9\]+\\)\\\[0\\\];" 1 "original" } }
21 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.yyy.\[0-9\]+\\)\\\[D.\[0-9\]+ \\* 4\\\];" 1 "original" } }
23 ! { dg-final { scan-tree-dump-times "D.\[0-9\]+ = parm.\[0-9\]+.data;\[^;]+ptr\[1-4\] = D.\[0-9\]+;" 4 "original" } }