aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorCesar Philippidis <cesar@codesourcery.com>2016-04-14 06:44:17 -0700
committerCesar Philippidis <cesar@gcc.gnu.org>2016-04-14 06:44:17 -0700
commite387fc6494396c13f68458c7e3ed94d492aca54f (patch)
treefd4a4a91473cffc90c7a2d4498805190de428f88 /gcc/omp-low.c
parente21401b6b11f87986ee08499619b861c6964286c (diff)
downloadgcc-e387fc6494396c13f68458c7e3ed94d492aca54f.zip
gcc-e387fc6494396c13f68458c7e3ed94d492aca54f.tar.gz
gcc-e387fc6494396c13f68458c7e3ed94d492aca54f.tar.bz2
re PR middle-end/70643 (broken openacc reduction inside a fortran module)
PR middle-end/70643 gcc/ * omp-low.c (lower_oacc_reductions): Check for TREE_CONSTANT when building a mem ref for the incoming reduction variable. libgomp/ * testsuite/libgomp.oacc-fortran/pr70643.f90: New test. From-SVN: r234973
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7335abc..aa3721e 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