summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/macro-4.c
blob: 7d20f4cd68d19afcfe8631deab3daaabc2aab758 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* PR preprocessor/27746 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -Wunknown-pragmas" } */

#define p		_Pragma ("omp parallel")
#define omp_p		_Pragma ("omp p")

void bar (void);

void
foo (void)
{
#pragma omp p		/* { dg-warning "ignoring #pragma omp _Pragma" } */
    bar ();
  omp_p			/* { dg-warning "ignoring #pragma omp _Pragma" } */
    bar ();
}

#define parallel	serial
#define omp_parallel	_Pragma ("omp parallel")

void
baz (void)
{
#pragma omp parallel	/* { dg-warning "ignoring #pragma omp serial" } */
    bar ();
  omp_parallel		/* { dg-warning "ignoring #pragma omp serial" } */
    bar ();
}