93 lines · plain
1!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=52 -Werror2 3! The directives to check:4! cancellation_point5! declare_mapper6! declare_reduction7! declare_simd8! declare_target9! declare_variant10! target_data11! target_enter_data12! target_exit_data13! target_update14 15subroutine f0016 implicit none17 integer :: i18 19 !$omp parallel20 do i = 1, 1021!WARNING: Directive spelling 'CANCELLATION_POINT' is introduced in a later OpenMP version, try -fopenmp-version=6022 !$omp cancellation_point parallel23 enddo24 !$omp end parallel25end26 27subroutine f0128 type :: t29 integer :: x30 end type31!WARNING: Directive spelling 'DECLARE_MAPPER' is introduced in a later OpenMP version, try -fopenmp-version=6032 !$omp declare_mapper(t :: v) map(v%x)33end34 35subroutine f0236 type :: t37 integer :: x38 end type39!WARNING: Directive spelling 'DECLARE_REDUCTION' is introduced in a later OpenMP version, try -fopenmp-version=6040 !$omp declare_reduction(+ : t : omp_out%x = omp_out%x + omp_in%x)41end42 43subroutine f0344!WARNING: Directive spelling 'DECLARE_SIMD' is introduced in a later OpenMP version, try -fopenmp-version=6045 !$omp declare_simd46end47 48subroutine f0449!WARNING: Directive spelling 'DECLARE_TARGET' is introduced in a later OpenMP version, try -fopenmp-version=6050 !$omp declare_target51end52 53subroutine f0554 implicit none55 interface56 subroutine g0557 end58 end interface59!WARNING: Directive spelling 'DECLARE_VARIANT' is introduced in a later OpenMP version, try -fopenmp-version=6060 !$omp declare_variant(g05) match(user={condition(.true.)})61end62 63subroutine f0664 implicit none65 integer :: i66!WARNING: Directive spelling 'TARGET_DATA' is introduced in a later OpenMP version, try -fopenmp-version=6067 !$omp target_data map(tofrom: i)68 i = 069!WARNING: Directive spelling 'TARGET_DATA' is introduced in a later OpenMP version, try -fopenmp-version=6070 !$omp end target_data71end72 73subroutine f0774 implicit none75 integer :: i76!WARNING: Directive spelling 'TARGET_ENTER_DATA' is introduced in a later OpenMP version, try -fopenmp-version=6077 !$omp target_enter_data map(to: i)78end79 80subroutine f0881 implicit none82 integer :: i83!WARNING: Directive spelling 'TARGET_EXIT_DATA' is introduced in a later OpenMP version, try -fopenmp-version=6084 !$omp target_exit_data map(from: i)85end86 87subroutine f0988 implicit none89 integer :: i90!WARNING: Directive spelling 'TARGET_UPDATE' is introduced in a later OpenMP version, try -fopenmp-version=6091 !$omp target_update to(i)92end93