[Ada] Fix thinko in Acc_Loop_to_gnu
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
This commit is contained in:
parent
c9d57552ed
commit
04d933fd48
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2019-08-19 Pierre-Marie de Rodat <derodat@adacore.com>
|
||||||
|
|
||||||
* gcc-interface/lang.opt (fdump-scos): Define.
|
* gcc-interface/lang.opt (fdump-scos): Define.
|
||||||
|
|
|
@ -3398,9 +3398,6 @@ independent_iterations_p (tree stmt_list)
|
||||||
static tree
|
static tree
|
||||||
Acc_Loop_to_gnu (Node_Id gnat_loop)
|
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_loop = make_node (OACC_LOOP);
|
||||||
tree acc_bind_expr = NULL_TREE;
|
tree acc_bind_expr = NULL_TREE;
|
||||||
Node_Id cur_loop = gnat_loop;
|
Node_Id cur_loop = gnat_loop;
|
||||||
|
@ -3517,7 +3514,7 @@ Acc_Loop_to_gnu (Node_Id gnat_loop)
|
||||||
|
|
||||||
BIND_EXPR_BODY (acc_bind_expr) = acc_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
|
/* Helper for Loop_Statement_to_gnu, to translate the body of a loop not
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2019-08-19 Olivier Hainque <hainque@adacore.com>
|
||||||
|
|
||||||
|
* gnat.dg/openacc1.adb: New testcase.
|
||||||
|
|
||||||
2019-08-19 Kito Cheng <kito.cheng@sifive.com>
|
2019-08-19 Kito Cheng <kito.cheng@sifive.com>
|
||||||
|
|
||||||
PR target/91441
|
PR target/91441
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
-- { 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;
|
Loading…
Reference in New Issue