aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-03-27 14:18:52 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2014-03-27 14:18:52 +0100
commit47519a144635d5629368cf8e2f4b766ebdc963d9 (patch)
treefc4c9c5d99c998c3e3086017941ad3ae7152640c /gcc/omp-low.c
parent82bb2e4069a7fdaa7cf8ccad2bdf7a6f8f4614c0 (diff)
downloadgcc-47519a144635d5629368cf8e2f4b766ebdc963d9.zip
gcc-47519a144635d5629368cf8e2f4b766ebdc963d9.tar.gz
gcc-47519a144635d5629368cf8e2f4b766ebdc963d9.tar.bz2
re PR middle-end/60682 ([OpenMP] ICE on an assignment of local variable inside SIMD loop)
PR middle-end/60682 * omp-low.c (lower_omp_1): For gimple_clobber_p stmts, if they need regimplification, just drop them instead of calling gimple_regimplify_operands on them. * g++.dg/gomp/pr60682.C: New test. From-SVN: r208864
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7cc398e..11bb2d3 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -10124,7 +10124,20 @@ lower_omp_1 (gimple_stmt_iterator *gsi_p, omp_context *ctx)
if ((ctx || task_shared_vars)
&& walk_gimple_op (stmt, lower_omp_regimplify_p,
ctx ? NULL : &wi))
- gimple_regimplify_operands (stmt, gsi_p);
+ {
+ /* Just remove clobbers, this should happen only if we have
+ "privatized" local addressable variables in SIMD regions,
+ the clobber isn't needed in that case and gimplifying address
+ of the ARRAY_REF into a pointer and creating MEM_REF based
+ clobber would create worse code than we get with the clobber
+ dropped. */
+ if (gimple_clobber_p (stmt))
+ {
+ gsi_replace (gsi_p, gimple_build_nop (), true);
+ break;
+ }
+ gimple_regimplify_operands (stmt, gsi_p);
+ }
break;
}
}