summaryrefslogtreecommitdiff
path: root/test/OpenMP/predefined_macro.c
blob: c9722d596d4d68466e3bf94fa75003035ede87dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
// RUN: %clang_cc1 -verify -o - %s

// RUN: %clang_cc1 -fopenmp-simd -verify -o - %s
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=45 -verify -o - %s
// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -verify -o - %s
// expected-no-diagnostics
#ifdef FOPENMP
// -fopenmp option is specified
#ifndef _OPENMP
#error "No _OPENMP macro is defined with -fopenmp option"
#elsif _OPENMP != 201107
#error "_OPENMP has incorrect value"
#endif //_OPENMP
#else
// No -fopenmp option is specified
#ifdef _OPENMP
#error "_OPENMP macro is defined without -fopenmp option"
#endif // _OPENMP
#endif // FOPENMP