gcc/testsuite/c-c++-common/gomp/atomic-9.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fopenmp -fdump-tree-ompexp" } */ |
| 3 | /* { dg-additional-options "-Wno-volatile" { target c++ } } */ |
| 4 | /* { dg-require-effective-target cas_int } */ |
| 5 | |
| 6 | volatile int *bar(void); |
| 7 | |
| 8 | void f1(void) |
| 9 | { |
| 10 | #pragma omp atomic |
| 11 | *bar() += 1; |
| 12 | } |
| 13 | |
| 14 | /* { dg-final { scan-tree-dump-times "__atomic_fetch_add" 1 "ompexp" } } */ |