@@ -16,6 +16,10 @@ contains
1616 call foo(a(1:10,1:10:2))
1717 end subroutine
1818
19+ ! CHECK-LABEL: func.func @_QMsection_testPtest_host()
20+ ! CHECK: fir.call @_FortranACUFDescriptorCheckSection
21+ ! CHECK: fir.call @_QMsection_testPfoo
22+
1923 attributes(device) subroutine zoo(a)
2024 real, device, dimension(:,:) :: a
2125 end subroutine
@@ -25,12 +29,23 @@ contains
2529 allocate(a(10,10))
2630 call zoo(a(1:10,1:10:2))
2731 end subroutine
28- end module
29-
30- ! CHECK-LABEL: func.func @_QMsection_testPtest_host()
31- ! CHECK: fir.call @_FortranACUFDescriptorCheckSection
32- ! CHECK: fir.call @_QMsection_testPfoo
3332
3433! CHECK-LABEL: func.func @_QMsection_testPtest_device()
3534! CHECK-NOT: fir.call @_FortranACUFDescriptorCheckSection
3635! CHECK: fir.call @_QMsection_testPzoo
36+
37+ subroutine ignore(a)
38+ real, device, dimension(:,:) :: a
39+ !dir$ ignore_tkr(c) a
40+ end subroutine
41+
42+ subroutine test_host2()
43+ real, device, allocatable, dimension(:,:) :: a
44+ allocate(a(10,10))
45+ call ignore(a(1:10,1:10:2))
46+ end subroutine
47+
48+ ! CHECK-LABEL: func.func @_QMsection_testPtest_host2()
49+ ! CHECK-NOT: fir.call @_FortranACUFDescriptorCheckSection
50+ ! CHECK: fir.call @_QMsection_testPignore
51+ end module
0 commit comments