Fix xfail for 32-bit hppa*-*-* in gcc.dg/pr84877.c
[official-gcc.git] / libgomp / testsuite / libgomp.c++ / cancel-for-1.C
blob8183a2d06a1e6bc1d04772179ef8f17f90d0377a
1 // { dg-do run }
2 // { dg-set-target-env-var OMP_CANCELLATION "true" }
4 #include <omp.h>
5 #include "cancel-test.h"
7 int
8 main ()
10   {
11     S c;
12     #pragma omp parallel num_threads (32)
13     {
14       S a, b;
15       int i;
16       #pragma omp for private (b) firstprivate (c)
17       for (i = 0; i < 1000; ++i)
18         {
19           S d;
20           #pragma omp cancel for
21           if (omp_get_cancellation ())
22             abort ();
23           b.bump ();
24           c.bump ();
25         }
26     }
27   }
28   S::verify ();