aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2009-11-13 19:38:36 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-11-13 19:38:36 +0100
commit2b32c27d98a24ef789729ded2e0c42108a9ea9e9 (patch)
treee4798597eb4798afea5b65f01b820229bfd13985 /libgomp
parent8410737add10f9f2b70616986a6a173c312b732e (diff)
downloadgcc-2b32c27d98a24ef789729ded2e0c42108a9ea9e9.zip
gcc-2b32c27d98a24ef789729ded2e0c42108a9ea9e9.tar.gz
gcc-2b32c27d98a24ef789729ded2e0c42108a9ea9e9.tar.bz2
re PR middle-end/42029 (ICE with complex data type and openmp for reduction clause)
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. From-SVN: r154161
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.c/pr42029.c19
2 files changed, 24 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index ba9393e..e36c7e2 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/42029
+ * libgomp.c/pr42029.c: New test.
+
2009-10-26 Jakub Jelinek <jakub@redhat.com>
* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Avoid using too many
diff --git a/libgomp/testsuite/libgomp.c/pr42029.c b/libgomp/testsuite/libgomp.c/pr42029.c
new file mode 100644
index 0000000..ea7ac2c
--- /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;
+}