xref: /llvm-project/flang/test/Semantics/cuf01.cuf (revision 27f71807dadbf4da1b6981c653f960b3f18d94e0)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2! Test conflicting CUDA subprogram attributes
3module m1
4 contains
5  !WARNING: ATTRIBUTES(Host) appears more than once
6  attributes(host,host) subroutine ok1; end
7  !WARNING: ATTRIBUTES(Host) appears more than once
8  attributes(host) attributes(host) subroutine ok2; end
9  attributes(host,device) subroutine ok3; end
10  attributes(device,host) subroutine ok4; end
11  !WARNING: ATTRIBUTES(Host) appears more than once
12  attributes(host,device,host) subroutine ok5; end
13  !WARNING: ATTRIBUTES(Device) appears more than once
14  attributes(device,host,device) subroutine ok6; end
15  !ERROR: ATTRIBUTES(Global) conflicts with earlier ATTRIBUTES(Host)
16  attributes(host,global) subroutine conflict1; end
17  !ERROR: ATTRIBUTES(Host) conflicts with earlier ATTRIBUTES(Global)
18  attributes(global,host) subroutine conflict2; end
19  !ERROR: ATTRIBUTES(Grid_Global) conflicts with earlier ATTRIBUTES(Host)
20  attributes(host,grid_global) subroutine conflict3; end
21  !TODO: more with launch_bounds & cluster_dims
22end module
23