This fixes a glitch introduced during the initial OpenACC work import
process, causing crashes on any Acc_Parallel + Acc_Loop combination.
2019-08-19 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
BIND_EXPR node we have constructed on purpose. Remove unused
variable.
gcc/testsuite/
* gnat.dg/openacc1.adb: New testcase.
From-SVN: r274638
+2019-08-19 Olivier Hainque <hainque@adacore.com>
+
+ * gcc-interface/trans.c (Acc_Loop_to_gnu): Return the openacc
+ BIND_EXPR node we have constructed on purpose. Remove unused
+ variable.
+
2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/lang.opt (fdump-scos): Define.
static tree
Acc_Loop_to_gnu (Node_Id gnat_loop)
{
- const struct loop_info_d * const gnu_loop_info = gnu_loop_stack->last ();
- tree gnu_loop_stmt = gnu_loop_info->stmt;
-
tree acc_loop = make_node (OACC_LOOP);
tree acc_bind_expr = NULL_TREE;
Node_Id cur_loop = gnat_loop;
BIND_EXPR_BODY (acc_bind_expr) = acc_loop;
- return gnu_loop_stmt;
+ return acc_bind_expr;
}
/* Helper for Loop_Statement_to_gnu, to translate the body of a loop not
+2019-08-19 Olivier Hainque <hainque@adacore.com>
+
+ * gnat.dg/openacc1.adb: New testcase.
+
2019-08-19 Kito Cheng <kito.cheng@sifive.com>
PR target/91441
--- /dev/null
+-- { dg-do compile }
+
+procedure OpenAcc1 is
+ type Integer_Array is array (1 .. 32) of Integer;
+ Data : Integer_Array;
+begin
+ for i in Data'Range loop
+ pragma Acc_Parallel;
+ pragma Acc_Loop(Worker);
+ Data (i) := i;
+ end loop;
+end;