diff options
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 0dcc593..84053a4 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -626,8 +626,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, /* Finally see if we have any elaboration procedures to deal with. */ for (info = elab_info_list; info; info = info->next) { - tree gnu_body = DECL_SAVED_TREE (info->elab_proc); - tree gnu_stmts; + tree gnu_body = DECL_SAVED_TREE (info->elab_proc), gnu_stmts; /* Unshare SAVE_EXPRs between subprograms. These are not unshared by the gimplifier for obvious reasons, but it turns out that we need to @@ -639,21 +638,16 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, an upstream bug for which we would not change the outcome. */ walk_tree_without_duplicates (&gnu_body, unshare_save_expr, NULL); - - /* We should have a BIND_EXPR, but it may or may not have any statements - in it. If it doesn't have any, we have nothing to do. */ + /* We should have a BIND_EXPR but it may not have any statements in it. + If it doesn't have any, we have nothing to do except for setting the + flag on the GNAT node. Otherwise, process the function as others. */ gnu_stmts = gnu_body; if (TREE_CODE (gnu_stmts) == BIND_EXPR) gnu_stmts = BIND_EXPR_BODY (gnu_stmts); - - /* If there are no statements, there is no elaboration code. */ if (!gnu_stmts || !STATEMENT_LIST_HEAD (gnu_stmts)) - { - Set_Has_No_Elaboration_Code (info->gnat_node, 1); - } + Set_Has_No_Elaboration_Code (info->gnat_node, 1); else { - /* Process the function as others. */ begin_subprog_body (info->elab_proc); end_subprog_body (gnu_body); } @@ -5294,12 +5288,11 @@ gnat_to_gnu (Node_Id gnat_node) gnu_result = alloc_stmt_list (); break; - /* SCIL nodes require no processing by this backend */ - case N_SCIL_Dispatch_Table_Object_Init: case N_SCIL_Dispatch_Table_Tag_Init: case N_SCIL_Dispatching_Call: case N_SCIL_Tag_Init: + /* SCIL nodes require no processing for GCC. */ gnu_result = alloc_stmt_list (); break; |