forked from flang-compiler/f18-llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang][cuda] Allow PINNED argument to host dummy (llvm#90651)
Update the `AreCompatibleCUDADataAttrs` function to return true when one argument has the `PINNED` attribute and the other argument is just host data.
- Loading branch information
1 parent
fb85a28
commit 89f8335
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
! RUN: %python %S/test_errors.py %s %flang_fc1 | ||
|
||
module matching | ||
interface sub | ||
module procedure sub_host | ||
module procedure sub_device | ||
end interface | ||
|
||
contains | ||
subroutine sub_host(a) | ||
integer :: a(:) | ||
end | ||
|
||
subroutine sub_device(a) | ||
integer, device :: a(:) | ||
end | ||
|
||
end module | ||
|
||
program m | ||
use matching | ||
|
||
integer, pinned, allocatable :: a(:) | ||
logical :: plog | ||
allocate(a(100), pinned = plog) | ||
|
||
call sub(a) | ||
end |