Andre Kuhlenschmidt 83b462af17
[flang][CLI] Have the CLI hint the flag to disable a warning (#144767)
Adds a hint to the warning message to disable a warning and updates the
tests to expect this.

Also fixes a bug in the storage of canonical spelling of error flags so
that they are not used after free.
2025-06-30 10:17:05 -07:00

23 lines
1.1 KiB
Plaintext

! RUN: %python %S/test_errors.py %s %flang_fc1
! Test conflicting CUDA subprogram attributes
module m1
contains
!WARNING: ATTRIBUTES(Host) appears more than once [-Wredundant-attribute]
attributes(host,host) subroutine ok1; end
!WARNING: ATTRIBUTES(Host) appears more than once [-Wredundant-attribute]
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 [-Wredundant-attribute]
attributes(host,device,host) subroutine ok5; end
!WARNING: ATTRIBUTES(Device) appears more than once [-Wredundant-attribute]
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