[testsuite] Require c99_runtime for pr79800.c
[official-gcc.git] / libgomp / testsuite / libgomp.c++ / cancel-test.h
blob776d6ee6321dbed23df40cf8514f9a47a78a0c2e
1 #include <stdlib.h>
2 #include <omp.h>
4 struct S
6 static int s;
7 int v;
8 S ()
10 #pragma omp atomic
11 s++;
14 S (int x)
16 #pragma omp atomic
17 s++;
18 v = x;
21 ~S ()
23 #pragma omp atomic
24 s--;
27 S (const S &x)
29 #pragma omp atomic
30 s++;
31 v = x.v;
34 static void
35 verify ()
37 if (s) abort ();
40 void
41 bump ()
43 v++;
47 int S::s = 0;