24 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=522! OpenMP Version 5.03! 2.4 Requires directive4! Target-related clauses in 'requires' directives must come strictly before any5! device constructs, such as declare target with device_type=nohost|any.6 7subroutine f8 integer, save :: x9 !WARNING: The usage of TO clause on DECLARE TARGET directive has been deprecated. Use ENTER clause instead. [-Wopen-mp-usage]10 !$omp declare target to(x) device_type(nohost)11 !$omp declare target enter(x) device_type(nohost)12end subroutine f13 14subroutine g15 !ERROR: REQUIRES directive with 'DYNAMIC_ALLOCATORS' clause found lexically after device construct16 !$omp requires dynamic_allocators17 !ERROR: REQUIRES directive with 'REVERSE_OFFLOAD' clause found lexically after device construct18 !$omp requires reverse_offload19 !ERROR: REQUIRES directive with 'UNIFIED_ADDRESS' clause found lexically after device construct20 !$omp requires unified_address21 !ERROR: REQUIRES directive with 'UNIFIED_SHARED_MEMORY' clause found lexically after device construct22 !$omp requires unified_shared_memory23end subroutine g24