+2016-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ * omp-low.c (lower_omp_target) <case USE_DEVICE_PTR>: Set
+ DECL_VALUE_EXPR of new_var even for the non-array case. Look
+ through DECL_VALUE_EXPR for expansion.
+
2016-01-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
* config/mips/mips.c (mips_compute_frame_info): Skip re-computing
SET_DECL_VALUE_EXPR (new_var, x);
DECL_HAS_VALUE_EXPR_P (new_var) = 1;
}
+ else
+ {
+ tree new_var = lookup_decl (var, ctx);
+ x = create_tmp_var_raw (TREE_TYPE (new_var), get_name (new_var));
+ gimple_add_tmp_var (x);
+ SET_DECL_VALUE_EXPR (new_var, x);
+ DECL_HAS_VALUE_EXPR_P (new_var) = 1;
+ }
break;
}
x = build_fold_addr_expr (v);
}
}
+ new_var = DECL_VALUE_EXPR (new_var);
x = fold_convert (TREE_TYPE (new_var), x);
gimplify_expr (&x, &new_body, NULL, is_gimple_val, fb_rvalue);
gimple_seq_add_stmt (&new_body,
+2016-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/goacc/use_device-1.c: New test.
+
2016-01-25 Jeff Law <law@redhat.com>
PR tree-optimization/69196
--- /dev/null
+/* { dg-do compile } */
+
+void bar (float *, float *);
+
+void
+foo (float *x, float *y)
+{
+ int n = 1 << 10;
+#pragma acc data create(x[0:n]) copyout(y[0:n])
+ {
+#pragma acc host_data use_device(x,y)
+ bar (x, y);
+ }
+}