1 /* { dg-do compile } */ 2 /* { dg-additional-options "-fdump-tree-original" } */ 3 /* { dg-final { scan-tree-dump-times "omp atomic release" 1 "original" } } */ 4 /* { dg-final { scan-tree-dump-times "omp atomic relaxed" 3 "original" } } */ 5 /* { dg-final { scan-tree-dump-times "omp atomic read relaxed" 1 "original" } } */ 6 /* { dg-final { scan-tree-dump-times "omp atomic capture relaxed" 1 "original" } } */ 7 8 int i, j, k, l, m, n; 9 10 void foo()11foo () 12 { 13 #pragma omp atomic release 14 i = i + 1; 15 } 16 17 #pragma omp requires atomic_default_mem_order (relaxed) 18 19 void bar()20bar () 21 { 22 int v; 23 #pragma omp atomic 24 j = j + 1; 25 #pragma omp atomic update 26 k = k + 1; 27 #pragma omp atomic read 28 v = l; 29 #pragma omp atomic write 30 m = v; 31 #pragma omp atomic capture 32 v = n = n + 1; 33 } 34