| ! 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 |