Commit 109bb910 by Richard Biener Committed by Richard Biener

re PR tree-optimization/82244 (-O2: ICE: tree check: expected ssa_name, have…

re PR tree-optimization/82244 (-O2: ICE: tree check: expected ssa_name, have integer_cst in replace_uses_by, at tree-cfg.c:1904)

2017-09-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82244
	* tree-vrp.c (remove_range_assertions): Do not propagate
	a constant to abnormals but replace the assert with a copy.

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

From-SVN: r252973
parent ffaea117
2017-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/82244
* tree-vrp.c (remove_range_assertions): Do not propagate
a constant to abnormals but replace the assert with a copy.
2017-09-19 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/57878
......
2017-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/82244
* gcc.dg/torture/pr82244.c: New testcase.
2017-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/69728
* gfortran.dg/graphite/pr69728.f90: New testcase.
* gcc.dg/graphite/pr69728.c: Likewise.
......
/* { dg-do compile } */
typedef struct a {
struct a *b;
} a;
extern int d(void);
extern int g(void);
extern int h(void);
extern int _setjmp(void *);
int c(void)
{
1 ? d() : 0;
a *e;
while (e) {
e = (e == (a *) c) ? 0 : e->b;
while (e) {
int f = 0;
g();
if (_setjmp(0)) {
if (f & 6) {
;
} else if (f & 2) {
h();
}
}
}
}
}
......@@ -7039,6 +7039,14 @@ remove_range_assertions (void)
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, var);
}
/* But do not propagate constants as that is invalid. */
else if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs))
{
gassign *ass = gimple_build_assign (lhs, var);
gsi_replace (&si, ass, true);
gsi_next (&si);
continue;
}
else
replace_uses_by (lhs, var);
......
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