diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 2004-06-26 17:30:01 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-06-26 17:30:01 -0400 |
commit | 90c28d48360b5975f18c0d56abbbed0f4407c328 (patch) | |
tree | d4c12f27f6c4ae8c019dd1f2b4fb297731113d90 /gcc/ada/utils.c | |
parent | 350fae6628af14c2e760694d39baec5f7858057c (diff) | |
download | gcc-90c28d48360b5975f18c0d56abbbed0f4407c328.zip gcc-90c28d48360b5975f18c0d56abbbed0f4407c328.tar.gz gcc-90c28d48360b5975f18c0d56abbbed0f4407c328.tar.bz2 |
ada-tree.def (DECL_STMT): Deleted.
2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* ada-tree.def (DECL_STMT): Deleted.
* ada-tree.h (IS_ADA_STMT): Now test against STMT_STMT.
(DECL_STMT_VAR): Deleted.
* decl.c: add_decl_stmt now add_decl_expr.
* gigi.h: Likewise.
* trans.c: Likewise.
(gnat_gimplify_type_sizes, gnat_gimplify_one_sizepos): Deleted.
(gnat_to_gnu, case N_Subprogram_Body): Set cfun->function_end_locus.
(add_stmt): Only handle padded type here.
(add_stmt_with_node): Allow gnat_node to not be present.
(gnat_gimplify_stmt, case USE_STMT): Set *STMT_P to null.
(gnat_gimplify_stmt, case DECL_STMT): Deleted.
(gnat_stabilize_reference_1): If COMPONENT_REF of fat pointer,
make a SAVE_EXPR for the entire fat pointer.
* utils.c (pushdecl): Walk a DECL_EXPR in global case.
(create_index_type): Make a DECL_EXPR.
(end_subprog_body): Don't call allocate_struct_function here but
do clear cfn.
From-SVN: r83722
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 7619b4a..53823e8 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -365,8 +365,12 @@ pushdecl (tree decl) that are part of sizes and positions. */ if (global_bindings_p () && TREE_CODE (decl) != PARM_DECL) { + /* Make a DECL_EXPR so we'll walk into the appropriate fields of + the type or decl. */ + tree decl_expr = build1 (DECL_EXPR, void_type_node, decl); + DECL_CONTEXT (decl) = 0; - walk_tree (&decl, mark_visited, NULL, NULL); + walk_tree (&decl_expr, mark_visited, NULL, NULL); } else DECL_CONTEXT (decl) = current_function_decl; @@ -1271,6 +1275,7 @@ create_index_type (tree min, tree max, tree index) type = copy_type (type); SET_TYPE_INDEX_TYPE (type, index); + add_decl_expr (create_type_decl (NULL_TREE, type, NULL, 1, 0), Empty); return type; } @@ -1899,9 +1904,6 @@ end_subprog_body (tree body) DECL_INLINE (fndecl) = DECL_DECLARED_INLINE_P (fndecl) || flag_inline_trees == 2; - /* Initialize the RTL code for the function. */ - allocate_struct_function (fndecl); - /* We handle pending sizes via the elaboration of types, so we don't need to save them. */ get_pending_sizes (); @@ -1912,6 +1914,7 @@ end_subprog_body (tree body) DECL_SAVED_TREE (fndecl) = body; current_function_decl = DECL_CONTEXT (fndecl); + cfun = NULL; /* If we're only annotating types, don't actually compile this function. */ if (type_annotate_only) |