diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-06-20 11:19:47 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-06-20 07:19:47 -0400 |
commit | c0e3aa48e50d3beab2abbbdc7098c7959d81b94c (patch) | |
tree | e033adad204593350250cac0b2e5b362bf93de59 /gcc/ada/utils2.c | |
parent | 543a0daa84fd7dda27536a892dd88896ba25b1f3 (diff) | |
download | gcc-c0e3aa48e50d3beab2abbbdc7098c7959d81b94c.zip gcc-c0e3aa48e50d3beab2abbbdc7098c7959d81b94c.tar.gz gcc-c0e3aa48e50d3beab2abbbdc7098c7959d81b94c.tar.bz2 |
decl.c (elaborate_expression, [...]): Arguments now bool instead of int.
* decl.c (elaborate_expression, elaborate_expression_1): Arguments
now bool instead of int.
(gnat_to_gnu_entity, elaborate_expression_1): New arg to COMPONENT_REF.
* trans.c (gnu_switch_label_stack): New function.
(gnat_to_gnu, N_Object_Renaming_Declaration): Result is what the
elaboration of renamed entity returns.
(gnat_to_gnu, case N_Case_Statement): Add branches to end label.
(add_decl_stmt): Don't add TYPE_DECL for UNCONSTRAINED_ARRAY_TYPE.
(gnat_gimplify_stmt): Use alloc_stmt_list, not build_empty_stmt.
(gnat_gimplify_stmt, case DECL_STMT): gimplify DECL_SIZE and
DECL_SIZE_UNIT and simplify variable-sized case.
(gnat_gimplify_type_sizes, gnat_gimplify_one_sizepos): Deleted.
Callers changes to call gimplify_type_sizes and gimplify_one_sizepos.
(gnat_stabilize_reference): Add arg to COMPONENT_REF.
(build_unit_elab): Disable for now.
* utils.c (mark_visited): New function.
(pushdecl): Walk tree to call it for global decl.
(update_pointer_to): Update all variants of pointer and ref types.
Add arg to COMPONENT_REF.
(convert): Likewise.
Move check for converting between variants lower down.
* utils2.c (build_simple_component_ref): Add arg to COMPONENT_REF.
(build_allocator): Don't force type of MODIFY_EXPR.
(gnat_mark_addressable, case VAR_DECL): Unconditionally call
put_var_into_stack.
From-SVN: r83410
Diffstat (limited to 'gcc/ada/utils2.c')
-rw-r--r-- | gcc/ada/utils2.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c index 0d83f74..f1c167f 100644 --- a/gcc/ada/utils2.c +++ b/gcc/ada/utils2.c @@ -1535,10 +1535,8 @@ gnat_build_constructor (tree type, tree list) actual record and know how to look for fields in variant parts. */ static tree -build_simple_component_ref (tree record_variable, - tree component, - tree field, - int no_fold_p) +build_simple_component_ref (tree record_variable, tree component, + tree field, int no_fold_p) { tree record_type = TYPE_MAIN_VARIANT (TREE_TYPE (record_variable)); tree ref; @@ -1610,7 +1608,8 @@ build_simple_component_ref (tree record_variable, /* It would be nice to call "fold" here, but that can lose a type we need to tag a PLACEHOLDER_EXPR with, so we can't do it. */ - ref = build (COMPONENT_REF, TREE_TYPE (field), record_variable, field); + ref = build (COMPONENT_REF, TREE_TYPE (field), record_variable, field, + NULL_TREE); if (TREE_READONLY (record_variable) || TREE_READONLY (field)) TREE_READONLY (ref) = 1; @@ -1625,10 +1624,8 @@ build_simple_component_ref (tree record_variable, reference could not be found. */ tree -build_component_ref (tree record_variable, - tree component, - tree field, - int no_fold_p) +build_component_ref (tree record_variable, tree component, + tree field, int no_fold_p) { tree ref = build_simple_component_ref (record_variable, component, field, no_fold_p); @@ -1930,7 +1927,7 @@ build_allocator (tree type, result = build (COMPOUND_EXPR, TREE_TYPE (result), build_binary_op - (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (result)), + (MODIFY_EXPR, NULL_TREE, build_unary_op (INDIRECT_REF, TREE_TYPE (TREE_TYPE (result)), result), init), @@ -1993,19 +1990,8 @@ gnat_mark_addressable (tree expr_node) case VAR_DECL: case PARM_DECL: case RESULT_DECL: - /* If we have already made a REG for this decl, we must put it - directly into the stack. Likewise for a MEM whose address is a - pseudo. Otherwise, set a flag to mark us to do it later. */ - if (DECL_RTL_SET_P (expr_node) - && (GET_CODE (DECL_RTL (expr_node)) == REG - || (GET_CODE (DECL_RTL (expr_node)) == MEM - && GET_CODE (XEXP (DECL_RTL (expr_node), 0)) == REG - && (REGNO (XEXP (DECL_RTL (expr_node), 0)) - > LAST_VIRTUAL_REGISTER)))) - put_var_into_stack (expr_node, 1); - else - TREE_ADDRESSABLE (expr_node) = 1; - + put_var_into_stack (expr_node, 1); + TREE_ADDRESSABLE (expr_node) = 1; return true; case FUNCTION_DECL: |