@@ -16,6 +16,10 @@ contains
16
16
call foo(a(1:10,1:10:2))
17
17
end subroutine
18
18
19
+ ! CHECK-LABEL: func.func @_QMsection_testPtest_host()
20
+ ! CHECK: fir.call @_FortranACUFDescriptorCheckSection
21
+ ! CHECK: fir.call @_QMsection_testPfoo
22
+
19
23
attributes(device) subroutine zoo(a)
20
24
real, device, dimension(:,:) :: a
21
25
end subroutine
@@ -25,12 +29,23 @@ contains
25
29
allocate(a(10,10))
26
30
call zoo(a(1:10,1:10:2))
27
31
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
33
32
34
33
! CHECK-LABEL: func.func @_QMsection_testPtest_device()
35
34
! CHECK-NOT: fir.call @_FortranACUFDescriptorCheckSection
36
35
! 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