blob: e18c3d26d4c225730ab0d93c37e4ff05bfcd5ce1 [file] [log] [blame]
Alexey Bataevdb390212015-05-20 04:24:19 +00001// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
Douglas Gregor15171282013-01-15 06:45:29 +00002// RUN: %clang_cc1 -verify -o - %s
3// expected-no-diagnostics
4#ifdef FOPENMP
Alexey Bataevdb390212015-05-20 04:24:19 +00005// -fopenmp option is specified
Douglas Gregor15171282013-01-15 06:45:29 +00006#ifndef _OPENMP
7#error "No _OPENMP macro is defined with -fopenmp option"
Alexey Bataevc6bd8912016-05-26 11:10:11 +00008#elsif _OPENMP != 201107
Douglas Gregor15171282013-01-15 06:45:29 +00009#error "_OPENMP has incorrect value"
Alexey Bataeva769e072013-03-22 06:34:35 +000010#endif //_OPENMP
11#else
Alexey Bataevdb390212015-05-20 04:24:19 +000012// No -fopenmp option is specified
Alexey Bataeva769e072013-03-22 06:34:35 +000013#ifdef _OPENMP
14#error "_OPENMP macro is defined without -fopenmp option"
15#endif // _OPENMP
16#endif // FOPENMP
17