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
This commit is contained in:
parent
40349fdf4f
commit
1d63e3de09
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
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)));
|
||||
|
|
Loading…
Add table
Reference in a new issue