Commit 1d63e3de by Eric Botcazou Committed by Eric Botcazou

trans.c (Subprogram_Body_to_gnu): Use while instead of for loop.

	* gcc-interface/trans.c (Subprogram_Body_to_gnu): Use while instead of
	for loop.  Call build_constructor_from_list directly in the CICO case.

From-SVN: r161046
parent 40349fdf
2010-06-20 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Use while instead of
for loop. Call build_constructor_from_list directly in the CICO case.
2010-06-18 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Build_And_Analyze_Renamed_Body): If the renaming
......
......@@ -2462,9 +2462,8 @@ Subprogram_Body_to_gnu (Node_Id gnat_node)
{
/* Skip any entries that have been already filled in; they must
correspond to In Out parameters. */
for (; gnu_cico_list && TREE_VALUE (gnu_cico_list);
gnu_cico_list = TREE_CHAIN (gnu_cico_list))
;
while (gnu_cico_list && TREE_VALUE (gnu_cico_list))
gnu_cico_list = TREE_CHAIN (gnu_cico_list);
/* Do any needed references for padded types. */
TREE_VALUE (gnu_cico_list)
......@@ -2546,8 +2545,8 @@ Subprogram_Body_to_gnu (Node_Id gnat_node)
if (list_length (gnu_cico_list) == 1)
gnu_retval = TREE_VALUE (gnu_cico_list);
else
gnu_retval = gnat_build_constructor (TREE_TYPE (gnu_subprog_type),
gnu_cico_list);
gnu_retval = build_constructor_from_list (TREE_TYPE (gnu_subprog_type),
gnu_cico_list);
add_stmt_with_node (build_return_expr (gnu_result_decl, gnu_retval),
End_Label (Handled_Statement_Sequence (gnat_node)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment