diff options
author | Richard Biener <rguenther@suse.de> | 2014-11-27 14:22:29 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-11-27 14:22:29 +0000 |
commit | a92bf1b1c7942a6fb8af77bf8d90382aab60341f (patch) | |
tree | 5019f45050c3cfff3b6741586bbc44dd2531f212 /gcc/tree-ssa-tail-merge.c | |
parent | c17eac85616572b7e1163cfb87d95a7875c89407 (diff) | |
download | gcc-a92bf1b1c7942a6fb8af77bf8d90382aab60341f.zip gcc-a92bf1b1c7942a6fb8af77bf8d90382aab60341f.tar.gz gcc-a92bf1b1c7942a6fb8af77bf8d90382aab60341f.tar.bz2 |
re PR middle-end/64088 (ICE: in fold_abs_const, at fold-const.c:15550)
2014-11-27 Richard Biener <rguenther@suse.de>
PR middle-end/64088
* fold-const.c (const_unop): Re-instantiate missing condition
before calling fold_abs_const.
* gcc.dg/torture/pr64088.c: New testcase.
PR tree-optimization/64088
* tree-ssa-tail-merge.c (update_debug_stmt): After resetting
the stmt break from the loop over use operands.
* gcc.dg/torture/pr64091.c: New testcase.
From-SVN: r218128
Diffstat (limited to 'gcc/tree-ssa-tail-merge.c')
-rw-r--r-- | gcc/tree-ssa-tail-merge.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c index 230a422..07814c9 100644 --- a/gcc/tree-ssa-tail-merge.c +++ b/gcc/tree-ssa-tail-merge.c @@ -1606,9 +1606,7 @@ update_debug_stmt (gimple stmt) { use_operand_p use_p; ssa_op_iter oi; - basic_block bbdef, bbuse; - gimple def_stmt; - tree name; + basic_block bbuse; if (!gimple_debug_bind_p (stmt)) return; @@ -1616,19 +1614,16 @@ update_debug_stmt (gimple stmt) bbuse = gimple_bb (stmt); FOR_EACH_PHI_OR_STMT_USE (use_p, stmt, oi, SSA_OP_USE) { - name = USE_FROM_PTR (use_p); - gcc_assert (TREE_CODE (name) == SSA_NAME); - - def_stmt = SSA_NAME_DEF_STMT (name); - gcc_assert (def_stmt != NULL); - - bbdef = gimple_bb (def_stmt); + tree name = USE_FROM_PTR (use_p); + gimple def_stmt = SSA_NAME_DEF_STMT (name); + basic_block bbdef = gimple_bb (def_stmt); if (bbdef == NULL || bbuse == bbdef || dominated_by_p (CDI_DOMINATORS, bbuse, bbdef)) continue; gimple_debug_bind_reset_value (stmt); update_stmt (stmt); + break; } } |