xfail scan-tree-dump-not throw in g++.dg/pr99966.C on hppa*64*-*-*
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / critical-hint-2.c
blob057353b6ce280ce91a4bdd5108655f59a20e9e49
1 /* { dg-do compile } */
2 /* { dg-additional-options "-fdump-tree-original" } */
3 #include <omp.h>
5 void
6 example_criticial ()
8 int a, b;
9 #pragma omp parallel for
10 for (int i = 0; i < 10; ++i)
12 #pragma omp critical hint(omp_sync_hint_none)
13 a += i;
14 #pragma omp critical (HASH1) hint(omp_sync_hint_none)
15 a += i;
16 #pragma omp critical (HASH2) hint(omp_sync_hint_uncontended)
17 a += i;
18 #pragma omp critical (HASH3) hint(omp_sync_hint_contended)
19 a += i;
20 #pragma omp critical (HASH4) hint(omp_sync_hint_speculative)
21 a += i;
22 #pragma omp critical (HASH5) hint(omp_sync_hint_nonspeculative)
23 a += i;
24 #pragma omp critical (HASH6) hint(omp_sync_hint_contended + omp_sync_hint_speculative)
25 a += i;
26 #pragma omp critical (HASH7) hint(omp_sync_hint_contended | omp_sync_hint_speculative)
27 a += i;
31 /* { dg-final { scan-tree-dump-times "omp critical \\(HASH1\\) hint\\(0\\)" 1 "original" } } */
32 /* { dg-final { scan-tree-dump-times "omp critical \\(HASH2\\) hint\\(1\\)" 1 "original" } } */
33 /* { dg-final { scan-tree-dump-times "omp critical \\(HASH3\\) hint\\(2\\)" 1 "original" } } */
34 /* { dg-final { scan-tree-dump-times "omp critical \\(HASH4\\) hint\\(8\\)" 1 "original" } } */
35 /* { dg-final { scan-tree-dump-times "omp critical \\(HASH5\\) hint\\(4\\)" 1 "original" } } */
36 /* { dg-final { scan-tree-dump-times "omp critical \\(HASH6\\) hint\\(10\\)" 1 "original" } } */
37 /* { dg-final { scan-tree-dump-times "omp critical \\(HASH7\\) hint\\(10\\)" 1 "original" } } */