Skip various cmp-mem-const tests on lp64 hppa*-*-*
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / task-detach-3.c
blobc85857de21c97de8ff0e6b05dc52f43be66544eb
1 /* { dg-do run } */
3 #include <omp.h>
4 #include <assert.h>
6 /* Test the task detach clause used together with dependencies. */
8 int main (void)
10 omp_event_handle_t detach_event;
11 int x = 0, y = 0, z = 0;
12 int dep;
14 #pragma omp parallel
15 #pragma omp single
17 #pragma omp task depend (out:dep) detach (detach_event)
18 x++;
20 #pragma omp task
22 y++;
23 omp_fulfill_event (detach_event);
26 #pragma omp task depend (in:dep)
27 z++;
30 assert (x == 1);
31 assert (y == 1);
32 assert (z == 1);