aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/gimplify.c2
-rw-r--r--libgomp/ChangeLog5
-rw-r--r--libgomp/testsuite/libgomp.c/pr42029.c19
4 files changed, 34 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bb92e10..e5dec6f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,8 +1,14 @@
+2009-11-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/42029
+ * gimplify.c (gimplify_omp_atomic): Set DECL_GIMPLE_REG_P on
+ tmp_load if needed.
+
2009-11-13 Uros Bizjak <ubizjak@gmail.com>
PR target/41900
- (*call_pop_1, *call_1, *call_value_pop_1, *call_value_1): Use "lsm"
- as operand 1 constraint.
+ * config/i386/i386.md (*call_pop_1, *call_1, *call_value_pop_1,
+ *call_value_1): Use "lsm" as operand 1 constraint.
* config/i386/predicates.md (call_insn_operand): Depend on
index_register_operand to avoid %esp register.
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index d68aacd..8404e0f 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6231,6 +6231,8 @@ gimplify_omp_atomic (tree *expr_p, gimple_seq *pre_p)
tree tmp_load;
tmp_load = create_tmp_var (type, NULL);
+ if (TREE_CODE (type) == COMPLEX_TYPE || TREE_CODE (type) == VECTOR_TYPE)
+ DECL_GIMPLE_REG_P (tmp_load) = 1;
if (goa_stabilize_expr (&rhs, pre_p, addr, tmp_load) < 0)
return GS_ERROR;
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;
+}