[llvm] Stop including unordered_map (NFC)
[llvm-project.git] / openmp / runtime / test / tasking / taskdep_if0.c
blob9e44d55421638f90438f64d9d8d3d487f49efc8c
1 // RUN: %libomp-compile-and-run
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <omp.h>
6 #include "omp_my_sleep.h"
8 int a = 0;
10 void task1() {
11 my_sleep(0.5);
12 a = 10;
15 void task2() {
16 a++;
19 int main(int argc, char** argv)
21 #pragma omp parallel shared(argc) num_threads(2)
23 #pragma omp single
25 #pragma omp task depend(out: a)
26 task1();
28 #pragma omp task if(0) depend(inout: a)
29 task2();
32 if (a != 11) {
33 fprintf(stderr, "fail: expected 11, but a is %d\n", a);
34 exit(1);
35 } else {
36 printf("pass\n");
38 return 0;