2015-05-20 12:24:19 +08:00
|
|
|
// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
|
2013-03-22 14:34:35 +08:00
|
|
|
// RUN: %clang_cc1 -verify -o - %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
#ifdef FOPENMP
|
2015-05-20 12:24:19 +08:00
|
|
|
// -fopenmp option is specified
|
2013-03-22 14:34:35 +08:00
|
|
|
#ifndef _OPENMP
|
|
|
|
#error "No _OPENMP macro is defined with -fopenmp option"
|
2014-03-06 20:27:56 +08:00
|
|
|
#elsif _OPENMP != 201307
|
2013-03-22 14:34:35 +08:00
|
|
|
#error "_OPENMP has incorrect value"
|
|
|
|
#endif //_OPENMP
|
|
|
|
#else
|
2015-05-20 12:24:19 +08:00
|
|
|
// No -fopenmp option is specified
|
2013-03-22 14:34:35 +08:00
|
|
|
#ifdef _OPENMP
|
|
|
|
#error "_OPENMP macro is defined without -fopenmp option"
|
|
|
|
#endif // _OPENMP
|
|
|
|
#endif // FOPENMP
|
|
|
|
|