aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-uninit.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-24 12:44:58 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-24 12:44:58 +0000
commitaea0101d9553c16556c3eb2ce66761e9dc95b40f (patch)
tree360e0745d4435c019b457ee1faff9ba27ed5d218 /gcc/tree-ssa-uninit.c
parent99b8202a118ba0ab7eaaa21f83581998d7bcdc6f (diff)
downloadgcc-aea0101d9553c16556c3eb2ce66761e9dc95b40f.zip
gcc-aea0101d9553c16556c3eb2ce66761e9dc95b40f.tar.gz
gcc-aea0101d9553c16556c3eb2ce66761e9dc95b40f.tar.bz2
re PR middle-end/57287 (Bogus uninitialized warning with abnormal control flow)
2013-05-24 Richard Biener <rguenther@suse.de> PR tree-optimization/57287 * tree-ssa-uninit.c (compute_uninit_opnds_pos): Disregard all SSA names that occur in abnormal PHIs. * gcc.dg/pr57287.c: New testcase. From-SVN: r199289
Diffstat (limited to 'gcc/tree-ssa-uninit.c')
-rw-r--r--gcc/tree-ssa-uninit.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index aa01c51..9a726f1 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -165,17 +165,12 @@ compute_uninit_opnds_pos (gimple phi)
&& uninit_undefined_value_p (op)
&& !can_skip_redundant_opnd (op, phi))
{
- /* Ignore SSA_NAMEs on abnormal edges to setjmp
- or nonlocal goto receiver. */
if (cfun->has_nonlocal_label || cfun->calls_setjmp)
{
- edge e = gimple_phi_arg_edge (phi, i);
- if (e->flags & EDGE_ABNORMAL)
- {
- gimple last = last_stmt (e->src);
- if (last && stmt_can_make_abnormal_goto (last))
- continue;
- }
+ /* Ignore SSA_NAMEs that appear on abnormal edges
+ somewhere. */
+ if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op))
+ continue;
}
MASK_SET_BIT (uninit_opnds, i);
}