1 ! Test predefined _OPENMP macro which denotes OpenMP version
3 ! RUN: %flang_fc1 -fopenmp -cpp -E %s | FileCheck %s --check-prefix=DEFAULT-OPENMP-VERSION
4 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=11 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-11
5 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=11 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-11
6 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=20 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-20
7 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=25 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-25
8 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=30 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-30
9 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=31 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-31
10 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=40 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-40
11 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=45 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-45
12 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=50 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-50
13 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=51 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-51
14 ! RUN: %flang_fc1 -fopenmp -fopenmp-version=52 -cpp -E %s | FileCheck %s --check-prefix=OPENMP-VERSION-52
16 ! DEFAULT-OPENMP-VERSION: integer :: var1 = 199911
17 ! OPENMP-VERSION-11: integer :: var1 = 199911
18 ! OPENMP-VERSION-20: integer :: var1 = 200011
19 ! OPENMP-VERSION-25: integer :: var1 = 200505
20 ! OPENMP-VERSION-30: integer :: var1 = 200805
21 ! OPENMP-VERSION-31: integer :: var1 = 201107
22 ! OPENMP-VERSION-40: integer :: var1 = 201307
23 ! OPENMP-VERSION-45: integer :: var1 = 201511
24 ! OPENMP-VERSION-50: integer :: var1 = 201811
25 ! OPENMP-VERSION-51: integer :: var1 = 202011
26 ! OPENMP-VERSION-52: integer :: var1 = 202111
29 integer :: var1
= _OPENMP