[llvm] Stop including unordered_map (NFC)
[llvm-project.git] / openmp / runtime / test / worksharing / for / bug_set_schedule_0.c
blob813b31c20c1eea88f3ce048f8e5347ab0810630e
1 // RUN: %libomp-compile-and-run
3 #include <stdio.h>
4 #include <omp.h>
5 #include "omp_testsuite.h"
7 /* Test that the chunk size is set to default (1) when
8 chunk size <= 0 is specified */
9 int a = 0;
11 int test_set_schedule_0()
13 int i;
14 a = 0;
15 omp_set_schedule(omp_sched_dynamic,0);
17 #pragma omp parallel
19 #pragma omp for schedule(runtime)
20 for(i = 0; i < 10; i++) {
21 #pragma omp atomic
22 a++;
23 if(a > 10)
24 exit(1);
27 return a==10;
30 int main()
32 int i;
33 int num_failed=0;
35 for(i = 0; i < REPETITIONS; i++) {
36 if(!test_set_schedule_0()) {
37 num_failed++;
40 return num_failed;