diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-13 15:50:02 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-13 15:50:02 +0000 |
commit | 0f94f46bb0d674f18f949458a88fa0dafa313a43 (patch) | |
tree | 0c13f4d4a47b9ebcbcd30c9e09f47ca6a8b0b2b1 /libgomp | |
parent | 191115df73333fc5fd411af13e446507eeac2ea3 (diff) | |
download | gcc-0f94f46bb0d674f18f949458a88fa0dafa313a43.tar.gz |
PR middle-end/48591
* omp-low.c (expand_omp_atomic_fetch_op): Return false if decl is
NULL.
(expand_omp_atomic_pipeline): Return false if cmpxchg is NULL.
* gcc.dg/gomp/pr48591.c: New test.
* testsuite/libgomp.c/pr48591.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172379 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr48591.c | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 52ea1433548..af2ad8e3cd8 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2011-04-13 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/48591 + * testsuite/libgomp.c/pr48591.c: New test. + 2011-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR bootstrap/48135 diff --git a/libgomp/testsuite/libgomp.c/pr48591.c b/libgomp/testsuite/libgomp.c/pr48591.c new file mode 100644 index 00000000000..18dfd7f47be --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr48591.c @@ -0,0 +1,22 @@ +/* PR middle-end/48591 */ +/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* } } */ +/* { dg-options "-fopenmp" } */ + +extern void abort (void); + +int +main () +{ + __float128 f = 0.0; + int i; + #pragma omp parallel for reduction(+:f) + for (i = 0; i < 128; i++) + f += 0.5Q; + if (f != 64.0Q) + abort (); + #pragma omp atomic + f += 8.5Q; + if (f != 72.5Q) + abort (); + return 0; +} |