xref: /aosp_15_r20/external/clang/test/OpenMP/predefined_macro.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
2*67e74705SXin Li // RUN: %clang_cc1 -verify -o - %s
3*67e74705SXin Li // expected-no-diagnostics
4*67e74705SXin Li #ifdef FOPENMP
5*67e74705SXin Li // -fopenmp option is specified
6*67e74705SXin Li #ifndef _OPENMP
7*67e74705SXin Li #error "No _OPENMP macro is defined with -fopenmp option"
8*67e74705SXin Li #elsif _OPENMP != 201107
9*67e74705SXin Li #error "_OPENMP has incorrect value"
10*67e74705SXin Li #endif //_OPENMP
11*67e74705SXin Li #else
12*67e74705SXin Li // No -fopenmp option is specified
13*67e74705SXin Li #ifdef _OPENMP
14*67e74705SXin Li #error "_OPENMP macro is defined without -fopenmp option"
15*67e74705SXin Li #endif // _OPENMP
16*67e74705SXin Li #endif // FOPENMP
17*67e74705SXin Li 
18