Commit 999c1171 by Richard Biener Committed by Richard Biener

re PR middle-end/57026 (ice: SSA corruption)

2013-04-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/57026
	* tree-vrp.c (simplify_conversion_using_ranges): Do not propagate
	from SSA names occuring in abnormal PHI nodes.

	* gcc.dg/torture/pr57026.c: New testcase.

From-SVN: r198175
parent 53669259
2013-04-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/57026
* tree-vrp.c (simplify_conversion_using_ranges): Do not propagate
from SSA names occuring in abnormal PHI nodes.
2013-04-22 Andi Kleen <ak@linux.intel.com> 2013-04-22 Andi Kleen <ak@linux.intel.com>
* lto/lto.c (print_lto_report_1): Fix LTO report names. * lto/lto.c (print_lto_report_1): Fix LTO report names.
......
2013-04-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/57026
* gcc.dg/torture/pr57026.c: New testcase.
2013-04-22 Janus Weil <janus@gcc.gnu.org> 2013-04-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/53685 PR fortran/53685
......
/* { dg-do compile } */
typedef struct __jmp_buf_tag { char buf[1024]; } jmp_buf[1];
extern int setjmp (jmp_buf);
extern int bar (unsigned int *);
extern jmp_buf *baz (void);
struct C { int c1; unsigned int c2, c3, c4; };
void
foo (struct C *x, const int *y, unsigned int *z, unsigned int e, unsigned int g)
{
unsigned int d = 0;
unsigned long f;
setjmp (*baz ());
f = d;
if ((x->c1 || x->c2) && g && (!e || d >= 8))
d = 16;
else
d = 8;
if ((!x->c3 && !x->c4 || *y == 0) && !e && bar (z))
*z = f;
}
...@@ -8752,7 +8752,8 @@ simplify_conversion_using_ranges (gimple stmt) ...@@ -8752,7 +8752,8 @@ simplify_conversion_using_ranges (gimple stmt)
|| !CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt))) || !CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt)))
return false; return false;
innerop = gimple_assign_rhs1 (def_stmt); innerop = gimple_assign_rhs1 (def_stmt);
if (TREE_CODE (innerop) != SSA_NAME) if (TREE_CODE (innerop) != SSA_NAME
|| SSA_NAME_OCCURS_IN_ABNORMAL_PHI (innerop))
return false; return false;
/* Get the value-range of the inner operand. */ /* Get the value-range of the inner operand. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment