view gcc/testsuite/g++.dg/gomp/macro-4.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line source

// 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 ();
}