summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/omp-low.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 19575f0fc79..ca2a9a74600 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-14 Cesar Philippidis <cesar@codesourcery.com>
+
+ PR middle-end/70643
+ * omp-low.c (lower_oacc_reductions): Check for TREE_CONSTANT
+ when building a mem ref for the incoming reduction variable.
+
2016-04-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/70614
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7335abc6396..aa3721edc9d 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -5691,7 +5691,7 @@ lower_oacc_reductions (location_t loc, tree clauses, tree level, bool inner,
v3 = build_simple_mem_ref (v3);
outgoing = build_simple_mem_ref (outgoing);
- if (TREE_CODE (incoming) != INTEGER_CST)
+ if (!TREE_CONSTANT (incoming))
incoming = build_simple_mem_ref (incoming);
}
else