diff options
author | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-30 12:37:47 +0000 |
---|---|---|
committer | vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-30 12:37:47 +0000 |
commit | dfc8fda44e37c867400d6e19f45dd362dd4dc483 (patch) | |
tree | bfab37b2b93f99da187abb936e89b5750831b3b1 /gcc/tree-ssa-dce.c | |
parent | b1bd5bd7340cddb53a939afcb64a791f2a87d804 (diff) | |
download | gcc-dfc8fda44e37c867400d6e19f45dd362dd4dc483.tar.gz |
2011-07-30 Tom de Vries <tom@codesourcery.com>
PR middle-end/43513
* tree-ssa-dce.c (ref_may_be_aliased): Add assert.
(propagate_necessity): Handle WITH_SIZE_EXPR call arg.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176959 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r-- | gcc/tree-ssa-dce.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 9597b573939..bf69bbf26b2 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -490,6 +490,7 @@ find_obviously_necessary_stmts (struct edge_list *el) static bool ref_may_be_aliased (tree ref) { + gcc_assert (TREE_CODE (ref) != WITH_SIZE_EXPR); while (handled_component_p (ref)) ref = TREE_OPERAND (ref, 0); if (TREE_CODE (ref) == MEM_REF @@ -850,6 +851,8 @@ propagate_necessity (struct edge_list *el) if (TREE_CODE (arg) == SSA_NAME || is_gimple_min_invariant (arg)) continue; + if (TREE_CODE (arg) == WITH_SIZE_EXPR) + arg = TREE_OPERAND (arg, 0); if (!ref_may_be_aliased (arg)) mark_aliased_reaching_defs_necessary (stmt, arg); } |