1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s
2f4a2713aSLionel Sambuc // RUN: %clang_cc1 -verify -o - %s
3f4a2713aSLionel Sambuc // expected-no-diagnostics
4f4a2713aSLionel Sambuc #ifdef FOPENMP
5*0a6a1f1dSLionel Sambuc // -fopenmp=libiomp5 option is specified
6f4a2713aSLionel Sambuc #ifndef _OPENMP
7f4a2713aSLionel Sambuc #error "No _OPENMP macro is defined with -fopenmp option"
8*0a6a1f1dSLionel Sambuc #elsif _OPENMP != 201307
9f4a2713aSLionel Sambuc #error "_OPENMP has incorrect value"
10f4a2713aSLionel Sambuc #endif //_OPENMP
11f4a2713aSLionel Sambuc #else
12*0a6a1f1dSLionel Sambuc // No -fopenmp=libiomp5 option is specified
13f4a2713aSLionel Sambuc #ifdef _OPENMP
14f4a2713aSLionel Sambuc #error "_OPENMP macro is defined without -fopenmp option"
15f4a2713aSLionel Sambuc #endif // _OPENMP
16f4a2713aSLionel Sambuc #endif // FOPENMP
17f4a2713aSLionel Sambuc 
18*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s
19f4a2713aSLionel Sambuc // RUN: %clang_cc1 -verify -o - %s
20f4a2713aSLionel Sambuc // expected-no-diagnostics
21f4a2713aSLionel Sambuc #ifdef FOPENMP
22*0a6a1f1dSLionel Sambuc // -fopenmp=libiomp5 option is specified
23f4a2713aSLionel Sambuc #ifndef _OPENMP
24f4a2713aSLionel Sambuc #error "No _OPENMP macro is defined with -fopenmp option"
25*0a6a1f1dSLionel Sambuc #elsif _OPENMP != 201307
26f4a2713aSLionel Sambuc #error "_OPENMP has incorrect value"
27f4a2713aSLionel Sambuc #endif // _OPENMP
28f4a2713aSLionel Sambuc #else
29*0a6a1f1dSLionel Sambuc // No -fopenmp=libiomp5 option is specified
30f4a2713aSLionel Sambuc #ifdef _OPENMP
31f4a2713aSLionel Sambuc #error "_OPENMP macro is defined without -fopenmp option"
32f4a2713aSLionel Sambuc #endif // _OPENMP
33f4a2713aSLionel Sambuc #endif // FOPENMP
34