diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-06 14:55:48 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-06 14:55:48 +0000 |
commit | 1cd6e20de6e40ead3795087811f151f00b06e016 (patch) | |
tree | c0f499483e35c60c1b9f065f10a630e6fa4345bc /gcc/testsuite/c-c++-common/gomp/atomic-2.c | |
parent | cf4f6acaf9fea9d480d8ae4ba6e46fbc662e771b (diff) | |
download | ppe42-gcc-1cd6e20de6e40ead3795087811f151f00b06e016.tar.gz ppe42-gcc-1cd6e20de6e40ead3795087811f151f00b06e016.zip |
Check in patch/merge from cxx-mem-model Branch
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181031 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/c-c++-common/gomp/atomic-2.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/gomp/atomic-2.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-2.c b/gcc/testsuite/c-c++-common/gomp/atomic-2.c new file mode 100644 index 00000000000..720ec9e8ba0 --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/atomic-2.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ + +float x, y; + +void f1(void) +{ + #pragma omp atomic + x++; + #pragma omp atomic + x--; + #pragma omp atomic + ++x; + #pragma omp atomic + --x; + #pragma omp atomic + x += 1; + #pragma omp atomic + x -= y; + #pragma omp atomic + x *= 3; + #pragma omp atomic + x /= 3; +} |