From 3c25489e88a7ea2937c19abff9163d9f7d8ca53a Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 8 Nov 2011 16:47:16 +0000 Subject: * gengtype.c (write_field_root): Avoid out-of-scope access of newv. * tree-stdarg.c (execute_optimize_stdarg): Accept clobbers. * tree.h (TREE_CLOBBER_P): New macro. * gimple.h (gimple_clobber_p): New inline function. * gimplify.c (gimplify_bind_expr): Add clobbers for all variables that go out of scope and live in memory. * tree-ssa-operands.c (get_expr_operands): Transfer volatility also for constructors. * cfgexpand.c (decl_to_stack_part): New static variable. (add_stack_var): Allocate it, and remember mapping. (fini_vars_expansion): Deallocate it. (stack_var_conflict_p): Add early outs. (visit_op, visit_conflict, add_scope_conflicts_1, add_scope_conflicts): New static functions. (expand_used_vars_for_block): Don't call add_stack_var_conflict, tidy. (expand_used_vars): Add scope conflicts. (expand_gimple_stmt_1): Expand clobbers to nothing. (expand_debug_expr): Ditto. * tree-pretty-print.c (dump_generic_node): Dump clobbers nicely. * tree-ssa-live.c (remove_unused_locals): Remove clobbers that refer to otherwise unused locals. * tree-sra.c (build_accesses_from_assign): Ignore clobbers. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Clobbers of SSA names aren't necessary. (propagate_necessity): Accept and ignore constructors on the rhs, tidy. * gimple.c (walk_gimple_op): Accept constructors like mem_rhs. * tree-ssa-structalias.c (find_func_aliases): Clobbers don't store any known value. * tree-ssa-sccvn.c (vn_reference_lookup_3): Ditto, in particular they don't zero-initialize something. * tree-ssa-phiopt.c (cond_if_else_store_replacement_1): Ignore clobber RHS, we don't want PHI nodes with those. testsuite/ * gcc.dg/tree-ssa/20031015-1.c: Adjust. * g++.dg/tree-ssa/ehcleanup-1.C: Ditto. * g++.dg/eh/builtin1.C: Rewrite to not use local variables. * g++.dg/eh/builtin2.C: Ditto. * g++.dg/eh/builtin3.C: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181172 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gimple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/gimple.c') diff --git a/gcc/gimple.c b/gcc/gimple.c index e803f56d0a3..57f15af313c 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1499,7 +1499,9 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, { /* If the RHS has more than 1 operand, it is not appropriate for the memory. */ - wi->val_only = !is_gimple_mem_rhs (gimple_assign_rhs1 (stmt)) + wi->val_only = !(is_gimple_mem_rhs (gimple_assign_rhs1 (stmt)) + || TREE_CODE (gimple_assign_rhs1 (stmt)) + == CONSTRUCTOR) || !gimple_assign_single_p (stmt); wi->is_lhs = true; } -- cgit v1.2.1