@@ -11,9 +11,15 @@ subroutine pass_ignore_tkr(buf, n)
1111 real , intent (inout ) :: buf(n)
1212 integer , intent (in ) :: n
1313 end subroutine
14+
15+ subroutine pass_ignore_tkr_c (buf , n )
16+ implicit none
17+ ! DIR$ IGNORE_TKR (tkrc) buf
18+ real , intent (inout ) :: buf(n)
19+ integer , intent (in ) :: n
20+ end subroutine
1421
1522 subroutine s1 ()
16-
1723! CHECK-LABEL: func.func @_QMtestPs1()
1824! CHECK: hlfir.copy_in
1925! CHECK: fir.call @_QMtestPpass_ignore_tkr
@@ -23,11 +29,9 @@ subroutine s1()
2329 x = [1 ,2 ,3 ,4 ,5 ]
2430 ! Non-contiguous input
2531 call pass_ignore_tkr(x(1 :: 2 ), size (x(1 :: 2 )))
26-
2732 end subroutine s1
2833
2934 subroutine s2 ()
30-
3135! CHECK-LABEL: func.func @_QMtestPs2()
3236! CHECK-NOT: hlfir.copy_in
3337! CHECK: fir.call @_QMtestPpass_ignore_tkr
@@ -37,9 +41,18 @@ subroutine s2()
3741 x = [1 ,2 ,3 ,4 ,5 ]
3842 ! Contiguous input
3943 call pass_ignore_tkr(x(1 :3 ), size (x(1 :3 )))
40-
4144 end subroutine s2
42- end module test
4345
46+ subroutine s3 ()
47+ ! CHECK-LABEL: func.func @_QMtestPs3()
48+ ! CHECK-NOT: hlfir.copy_in
49+ ! CHECK: fir.call @_QMtestPpass_ignore_tkr_c
50+ ! CHECK-NOT: hlfir.copy_out
4451
45- end program
52+ integer :: x(5 )
53+ x = [1 ,2 ,3 ,4 ,5 ]
54+ ! Non-contiguous input, but the dummy arg declaration ignores
55+ ! the contiguity check
56+ call pass_ignore_tkr_c(x(1 :: 2 ), size (x(1 :: 2 )))
57+ end subroutine s3
58+ end module test
0 commit comments