diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-13 18:38:36 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-13 18:38:36 +0000 |
commit | 960d903e2f4ec1824b9a8738cc0516b25242840d (patch) | |
tree | e4798597eb4798afea5b65f01b820229bfd13985 /libgomp/testsuite | |
parent | 000c9b40e327b35e8494165dd34a63d56260d628 (diff) | |
download | gcc-960d903e2f4ec1824b9a8738cc0516b25242840d.tar.gz |
PR middle-end/42029
* gimplify.c (gimplify_omp_atomic): Set DECL_GIMPLE_REG_P on
tmp_load if needed.
* libgomp.c/pr42029.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154161 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr42029.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/pr42029.c b/libgomp/testsuite/libgomp.c/pr42029.c new file mode 100644 index 00000000000..ea7ac2c0986 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr42029.c @@ -0,0 +1,19 @@ +/* PR middle-end/42029 */ +/* { dg-do run } */ + +extern void abort (void); + +int +main () +{ + int i; + _Complex int c = 0; + +#pragma omp parallel for private(i) reduction(+:c) + for (i = 0; i < 8; ++i) + c += 1; + + if (c != 8) + abort (); + return 0; +} |