| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-O0 -fdump-tree-original" } |
| 3 |
! |
| 4 |
! PR fortran/56907 |
| 5 |
! |
| 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\]+;" 1 "original" } } |
| 21 |
! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) yyy.\[0-9\]+ \\+ \\(sizetype\\) \\(D.\[0-9\]+ \\* 16\\);" 1 "original" } } |
| 22 |
|
| 23 |
! { dg-final { scan-tree-dump-times "D.\[0-9\]+ = parm.\[0-9\]+.data;\[^;]+ptr\[1-4\] = D.\[0-9\]+;" 4 "original" } } |