Files
clang-p2996/flang/test/Semantics/OpenMP/requires05.f90
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.0 KiB
Fortran

! RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=52
! OpenMP Version 5.0
! 2.4 Requires directive
! Target-related clauses in 'requires' directives must come strictly before any
! device constructs, such as declare target with 'to' clause and no device_type.
subroutine f
!WARNING: The usage of TO clause on DECLARE TARGET directive has been deprecated. Use ENTER clause instead. [-Wopen-mp-usage]
!$omp declare target to(f)
!$omp declare target enter(f)
end subroutine f
subroutine g
!ERROR: REQUIRES directive with 'DYNAMIC_ALLOCATORS' clause found lexically after device construct
!$omp requires dynamic_allocators
!ERROR: REQUIRES directive with 'REVERSE_OFFLOAD' clause found lexically after device construct
!$omp requires reverse_offload
!ERROR: REQUIRES directive with 'UNIFIED_ADDRESS' clause found lexically after device construct
!$omp requires unified_address
!ERROR: REQUIRES directive with 'UNIFIED_SHARED_MEMORY' clause found lexically after device construct
!$omp requires unified_shared_memory
end subroutine g