diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-02 17:43:40 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-02 17:43:40 +0000 |
commit | 9d172013409a3edff7bb43ed6162bf4d0ee72d58 (patch) | |
tree | af453d4b9541da0c90d1c0689ff569fa7c986574 /libgomp/testsuite/libgomp.c/simd-12.c | |
parent | 1fcecb123d804ed63241f44f3d12b8ba0864f0c6 (diff) | |
download | gcc-9d172013409a3edff7bb43ed6162bf4d0ee72d58.tar.gz |
* gimplify.c (gimplify_adjust_omp_clauses_1): Handle
GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE.
(gimplify_adjust_omp_clauses): Simd region is never
directly nested in combined parallel. Instead, for linear
with copyin/copyout, if in combined for simd loop, make decl
firstprivate/lastprivate on OMP_FOR.
* omp-low.c (expand_omp_for_generic, expand_omp_for_static_nochunk,
expand_omp_for_static_chunk): When setting endvar, also set
fd->loop.v to the same value.
libgomp/
* testsuite/libgomp.c/simd-10.c: New test.
* testsuite/libgomp.c/simd-11.c: New test.
* testsuite/libgomp.c/simd-12.c: New test.
* testsuite/libgomp.c/simd-13.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite/libgomp.c/simd-12.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c/simd-12.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/simd-12.c b/libgomp/testsuite/libgomp.c/simd-12.c new file mode 100644 index 00000000000..6685111a06e --- /dev/null +++ b/libgomp/testsuite/libgomp.c/simd-12.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-O2" } */ +/* { dg-additional-options "-msse2" { target sse2_runtime } } */ +/* { dg-additional-options "-mavx" { target avx_runtime } } */ + +int +main () +{ + int k = 0, i, s = 0; + #pragma omp parallel + #pragma omp for simd linear(k : 3) reduction(+: s) schedule (static, 16) + for (i = 0; i < 128; i++) + { + k = k + 3; + s = s + k; + } + if (s != 128 * 129 / 2 * 3) __builtin_abort (); + return 0; +} |