re PR other/61391 (ICE in execute_one_pass at -O3 and above)

2014-06-05  Yuri Rumyantsev  <ysrumyan@gmail.com>

gcc/
	PR tree-optimization/61391
	* tree-if-conv.c (is_cond_scalar_reduction): Add missed check that
	stmt belongs to loop.

gcc/testsuite/
	* gcc.dg/torture/pr61391.c: New test.

From-SVN: r211263
This commit is contained in:
Yuri Rumyantsev 2014-06-05 10:24:22 +00:00 committed by Kirill Yukhin
parent 947ca6a0c8
commit e12355efb7
4 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-06-05 Yuri Rumyantsev <ysrumyan@gmail.com>
PR tree-optimization/61319
* tree-if-conv.c (is_cond_scalar_reduction): Add missed check that
stmt belongs to loop.
2014-06-05 Richard Biener <rguenther@suse.de>
* gimplify.c (create_tmp_from_val): Remove is_formal parameter

View File

@ -1,3 +1,7 @@
2014-06-05 Yuri Rumyantsev <ysrumyan@gmail.com>
* gcc.dg/torture/pr61319.c: New test.
2014-06-05 Marek Polacek <polacek@redhat.com>
PR c/56724

View File

@ -0,0 +1,18 @@
/* { dg-do compile } */
short int u;
int h;
int i;
void
p(void)
{
int c[2] = { 0 };
for (h = 0; h < 2; ++h) {
static int *l = &h;
int t;
int n;
for (t = 0; t < 7; ++t)
c[0] = (i & -(short int)(c[h+1] || (u = -(n != *l))) || c[h+1]);
}
}

View File

@ -1439,6 +1439,9 @@ is_cond_scalar_reduction (gimple phi, gimple *reduc,
|| gimple_has_volatile_ops (stmt))
return false;
if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
return false;
if (!is_predicated (gimple_bb (stmt)))
return false;