re PR debug/70935 (ICE: verify_ssa failed (error: definition in block 9 does not dominate use in block 12) w/ -O3 -g)

gcc/

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

	PR debug/70935
	* tree-ssa-loop-unswitch.c (find_loop_guard): Reject guard edge with
	loop latch destination.

gcc/testsuite/

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

	PR debug/70935
	* gcc.dg/torture/pr70935.c: New test.

From-SVN: r235962
This commit is contained in:
Yuri Rumyantsev 2016-05-06 12:07:25 +00:00 committed by Ilya Enkovich
parent ac0e4fdebc
commit 19aa23d84e
4 changed files with 56 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2016-05-06 Yuri Rumyantsev <ysrumyan@gmail.com>
PR debug/70935
* tree-ssa-loop-unswitch.c (find_loop_guard): Reject guard edge with
loop latch destination.
2016-05-06 Martin Liska <mliska@suse.cz>
* tree-ssa-uninit.c: Apply manual changes

View File

@ -1,3 +1,8 @@
2016-05-06 Yuri Rumyantsev <ysrumyan@gmail.com>
PR debug/70935
* gcc.dg/torture/pr70935.c: New test.
2016-05-06 Oleg Endo <olegendo@gcc.gnu.org>
PR target/58219

View File

@ -0,0 +1,39 @@
/* { dg-do compile } */
/* { dg-options "-O3 -g" } */
int d0, sj, v0, rp, zi;
void
zn(void)
{
if (v0 != 0)
{
int *js, *r3;
int pm, gc;
for (gc = 0; gc < 1; ++gc)
{
sj = 1;
while (sj != 0)
;
}
r3 = &pm;
*js = (long)&gc;
ka:
for (d0 = 0; d0 < 2; ++d0)
{
d0 = zi;
if (zi)
for (pm = 2; pm != 0; --pm)
;
}
while (*r3 != 0)
{
while (pm)
;
++r3;
}
}
rp = 0;
goto ka;
}

View File

@ -536,6 +536,12 @@ find_loop_guard (struct loop *loop)
guard_edge->src->index, guard_edge->dest->index);
return NULL;
}
if (guard_edge->dest == loop->latch)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Guard edge destination is loop latch.\n");
return NULL;
}
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,