+2014-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ 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.
+
2014-03-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
PR target/60580
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;
}
}
+2014-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/60682
+ * g++.dg/gomp/pr60682.C: New test.
+
2014-03-27 John David Anglin <danglin@gcc.gnu.org>
* gcc.dg/torture/pr60092.c: Remove default dg-skip-if arguments.
--- /dev/null
+// PR middle-end/60682
+// { dg-do compile }
+// { dg-options "-O2 -fopenmp-simd" }
+
+struct A
+{
+ float a;
+ A () {}
+ A (const A &x) { a = x.a; }
+};
+
+struct B
+{
+ A a[16];
+};
+
+struct C
+{
+ float a[1];
+ C () {}
+ C (const C &x) { a[0] = x.a[0]; }
+};
+
+struct D
+{
+ C a[16];
+};
+
+void
+foo (int x, B &y, D &z)
+{
+#pragma omp simd
+ for (int i = 0; i < x; ++i)
+ {
+ A a;
+ y.a[i] = a;
+ }
+#pragma omp simd
+ for (int i = 0; i < x; ++i)
+ {
+ C a;
+ z.a[i] = a;
+ }
+}