annotate gcc/testsuite/gfortran.dg/c_loc_test_22.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
2 ! { dg-options "-O0 -fdump-tree-original" }
111
kono
parents:
diff changeset
3 !
kono
parents:
diff changeset
4 ! PR fortran/56907
kono
parents:
diff changeset
5 !
kono
parents:
diff changeset
6 subroutine sub(xxx, yyy)
kono
parents:
diff changeset
7 use iso_c_binding
kono
parents:
diff changeset
8 implicit none
kono
parents:
diff changeset
9 integer, target, contiguous :: xxx(:)
kono
parents:
diff changeset
10 integer, target :: yyy(:)
kono
parents:
diff changeset
11 type(c_ptr) :: ptr1, ptr2, ptr3, ptr4
kono
parents:
diff changeset
12 ptr1 = c_loc (xxx)
kono
parents:
diff changeset
13 ptr2 = c_loc (xxx(5:))
kono
parents:
diff changeset
14 ptr3 = c_loc (yyy)
kono
parents:
diff changeset
15 ptr4 = c_loc (yyy(5:))
kono
parents:
diff changeset
16 end
kono
parents:
diff changeset
17 ! { dg-final { scan-tree-dump-not " _gfortran_internal_pack" "original" } }
kono
parents:
diff changeset
18 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.xxx.\[0-9\]+\\)\\\[0\\\];" 1 "original" } }
kono
parents:
diff changeset
19 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.xxx.\[0-9\]+\\)\\\[D.\[0-9\]+ \\* 4\\\];" 1 "original" } }
kono
parents:
diff changeset
20 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.yyy.\[0-9\]+\\)\\\[0\\\];" 1 "original" } }
kono
parents:
diff changeset
21 ! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.yyy.\[0-9\]+\\)\\\[D.\[0-9\]+ \\* 4\\\];" 1 "original" } }
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 ! { dg-final { scan-tree-dump-times "D.\[0-9\]+ = parm.\[0-9\]+.data;\[^;]+ptr\[1-4\] = D.\[0-9\]+;" 4 "original" } }