summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-06 02:20:16 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-06 02:20:16 +0000
commit1f8a6ff8484e367b87d47717fae8eacf2deea6da (patch)
treee36b5564359495ed12dc4107ed22bf65a3afddcc /gcc/gimplify.c
parent03fee89c3c1c11afc6073aebba4e2d5cee7ed29f (diff)
downloadgcc-1f8a6ff8484e367b87d47717fae8eacf2deea6da.tar.gz
* langhooks-def.h (LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P): Extra arg.
* langhooks.h (var_mod_type_p): Likewise. * c-decl.c (finish_decl): Add extra arg to variably_modified_type_p. * expr.c (count_type_elements): Properly handle return from array_type_nelts and properly test for overflow. * gimplify.c (gimplify_init_constructor): Properly handle return from array_type_nelts. (gimplify_addr_expr): Remove redundant clear of TREE_SIDE_EFFECTS. * integrate.c (copy_decl_for_inlining): Correct comments. * tree-inline.c (remap_decl): Update comments, remove dead code, and copy DECL_FIELD_OFFSET and DECL_QUALIFIER, if they exist. (remap_type): Only remap if variably modified by vars in function being inlined. (copy_body_r): Use compatible_type langhooks to see when can fold. (setup_one_parameter): Don't remap type. (inline_forbidden_p_1): Add arg to variably_modified_type_p. * tree.c (recompute_tree_invarant_for_addr_expr): Properly compute TREE_INVARIANT for decl case. (find_var_from_fn): New function. (variably_modified_type_p): Add arg and call new function. * tree.h (variably_modified_type_p): Add extra arg. * cp/cp-lang.c (cp_var_mod_type_p): Add extra arg. * cp/decl.c (grokdeclarator): Extra arg to variably_modified_type_p. * cp/pt.c (check_instantiated_args, unify): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 20196fecfed..0493efa0b37 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2514,7 +2514,7 @@ gimplify_init_constructor (tree *expr_p, tree *pre_p,
{
tree nelts = array_type_nelts (type);
if (!host_integerp (nelts, 1)
- || tree_low_cst (nelts, 1) != len)
+ || tree_low_cst (nelts, 1) + 1 != len)
cleared = 1;;
}
else if (len != fields_length (type))
@@ -3050,12 +3050,8 @@ gimplify_addr_expr (tree *expr_p, tree *pre_p, tree *post_p)
is_gimple_addr_expr_arg, fb_either);
if (ret != GS_ERROR)
{
- /* At this point, the argument of the ADDR_EXPR should be
- sufficiently simple that there are never side effects. */
- /* ??? Could split out the decision code from build1 to verify. */
- TREE_SIDE_EFFECTS (expr) = 0;
-
- /* Make sure TREE_INVARIANT/TREE_CONSTANT is set properly. */
+ /* Make sure TREE_INVARIANT, TREE_CONSTANT, and TREE_SIDE_EFFECTS
+ is set properly. */
recompute_tree_invarant_for_addr_expr (expr);
/* Mark the RHS addressable. */