diff options
author | Cesar Philippidis <cesar@codesourcery.com> | 2016-04-14 06:44:17 -0700 |
---|---|---|
committer | Cesar Philippidis <cesar@gcc.gnu.org> | 2016-04-14 06:44:17 -0700 |
commit | e387fc6494396c13f68458c7e3ed94d492aca54f (patch) | |
tree | fd4a4a91473cffc90c7a2d4498805190de428f88 /gcc/omp-low.c | |
parent | e21401b6b11f87986ee08499619b861c6964286c (diff) | |
download | gcc-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.c | 2 |
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 |