bolt/deps/llvm-18.1.8/flang/test/Semantics/cuf01.cuf
2025-02-14 19:21:04 +01:00

22 lines
1 KiB
Text

! RUN: %python %S/test_errors.py %s %flang_fc1
! Test conflicting CUDA subprogram attributes
module m1
contains
!WARNING: ATTRIBUTES(Host) appears more than once
attributes(host,host) subroutine ok1; end
!WARNING: ATTRIBUTES(Host) appears more than once
attributes(host) attributes(host) subroutine ok2; end
attributes(host,device) subroutine ok3; end
attributes(device,host) subroutine ok4; end
!WARNING: ATTRIBUTES(Host) appears more than once
attributes(host,device,host) subroutine ok5; end
!WARNING: ATTRIBUTES(Device) appears more than once
attributes(device,host,device) subroutine ok6; end
!ERROR: ATTRIBUTES(Global) conflicts with earlier ATTRIBUTES(Host)
attributes(host,global) subroutine conflict1; end
!ERROR: ATTRIBUTES(Host) conflicts with earlier ATTRIBUTES(Global)
attributes(global,host) subroutine conflict2; end
!ERROR: ATTRIBUTES(Grid_Global) conflicts with earlier ATTRIBUTES(Host)
attributes(host,grid_global) subroutine conflict3; end
!TODO: more with launch_bounds & cluster_dims
end module