23 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Test conflicting CUDA subprogram attributes3module m14 contains5 !WARNING: ATTRIBUTES(Host) appears more than once [-Wredundant-attribute]6 attributes(host,host) subroutine ok1; end7 !WARNING: ATTRIBUTES(Host) appears more than once [-Wredundant-attribute]8 attributes(host) attributes(host) subroutine ok2; end9 attributes(host,device) subroutine ok3; end10 attributes(device,host) subroutine ok4; end11 !WARNING: ATTRIBUTES(Host) appears more than once [-Wredundant-attribute]12 attributes(host,device,host) subroutine ok5; end13 !WARNING: ATTRIBUTES(Device) appears more than once [-Wredundant-attribute]14 attributes(device,host,device) subroutine ok6; end15 !ERROR: ATTRIBUTES(Global) conflicts with earlier ATTRIBUTES(Host)16 attributes(host,global) subroutine conflict1; end17 !ERROR: ATTRIBUTES(Host) conflicts with earlier ATTRIBUTES(Global)18 attributes(global,host) subroutine conflict2; end19 !ERROR: ATTRIBUTES(Grid_Global) conflicts with earlier ATTRIBUTES(Host)20 attributes(host,grid_global) subroutine conflict3; end21 !TODO: more with launch_bounds & cluster_dims22end module23