Skip to content

Commit 2abf0cb

Browse files
Lower/force-temp.f90: added a test with IGNORE_TKR(C) and CONTIGUOUS
1 parent d93b7e2 commit 2abf0cb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

flang/test/Lower/force-temp.f90

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,19 @@ subroutine s7(b1, b2, n)
122122
!CHECK: hlfir.copy_out
123123
call s7(c1, c2, n)
124124
end subroutine call_s7
125+
subroutine call_s8()
126+
interface
127+
subroutine s8(buf)
128+
! IGNORE_TKR(C) takes precendence over CONTIGUOUS
129+
!DIR$ IGNORE_TKR(C) buf
130+
real, contiguous :: buf(:)
131+
end subroutine
132+
end interface
133+
real a(10)
134+
!CHECK-LABEL: func.func @_QMtestPcall_s8
135+
!CHECK-NOT: hlfir.copy_in
136+
!CHECK: fir.call @_QPs8
137+
!CHECK-NOT: hlfir.copy_out
138+
call s8(a(1:5:2))
139+
end subroutine call_s8
125140
end module

0 commit comments

Comments
 (0)