Commit 29545149 by Richard Biener Committed by Richard Biener

re PR tree-optimization/82157 (ICE on valid code at -O2 and -O3: cannot update SSA form)

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

	PR tree-optimization/82157
	* tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
	stmts with side-effects.

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

From-SVN: r252020
parent d681026d
2017-09-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/82157
* tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
stmts with side-effects.
2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
......
2017-09-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/82157
* gcc.dg/torture/pr82157.c: New testcase.
2017-09-12 Simon Atanasyan <simon.atanasyan@imgtec.com>
* gcc.target/mips/near-far-1.c: Add check for 'short_call'
......
/* { dg-do compile } */
int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z;
int aa ()
{
w = f < 0 || e >> f;
while (z)
h = i && (r && p) | ((l = p) == c % d);
k = v + 1 < a;
t = -(j < 1) * q;
return u;
}
int ab ()
{
for (j = 0; 1; j = 5)
if (!s)
return d;
}
void ac ()
{
char ad = aa ();
ab ();
if (x)
{
for (m = 0; m < 3; m = a)
{
y = a && b;
if (g)
break;
}
n = j;
}
o = j & ad;
}
int main ()
{
ac ();
return 0;
}
......@@ -4913,6 +4913,8 @@ remove_dead_inserted_code (void)
continue;
gimple *t = SSA_NAME_DEF_STMT (def);
if (gimple_has_side_effects (t))
continue;
/* Add uses to the worklist. */
ssa_op_iter iter;
......
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