re PR tree-optimization/69574 (gcc ICE at -O2 and -O3 on x86_64-linux-gnu in hide_evolution_in_other_loops_than_loop)

2016-02-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69574
	* tree-chrec.c (hide_evolution_in_other_loops_than_loop): Instead
	of asserting return chrec_dont_know.

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

From-SVN: r233039
This commit is contained in:
Richard Biener 2016-02-01 15:38:08 +00:00 committed by Richard Biener
parent 0b2e1bfa0a
commit bc369dbd3f
4 changed files with 31 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2016-02-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/69574
* tree-chrec.c (hide_evolution_in_other_loops_than_loop): Instead
of asserting return chrec_dont_know.
2016-02-01 Martin Liska <mliska@suse.cz>
* mem-stats-traits.h: Add copyright header.

View File

@ -1,3 +1,8 @@
2016-02-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/69574
* gcc.dg/torture/pr69574.c: New testcase.
2016-02-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/69579

View File

@ -0,0 +1,15 @@
/* { dg-do compile } */
typedef unsigned mytype;
struct S {
mytype *pu;
};
mytype f(struct S *e)
{
mytype x;
if(&x != e->pu)
__builtin_memcpy(&x, e->pu, sizeof(unsigned));
return x;
}

View File

@ -728,12 +728,12 @@ hide_evolution_in_other_loops_than_loop (tree chrec,
/* There is no evolution in this loop. */
return initial_condition (chrec);
else if (flow_loop_nested_p (loop, chloop))
return hide_evolution_in_other_loops_than_loop (CHREC_LEFT (chrec),
loop_num);
else
{
gcc_assert (flow_loop_nested_p (loop, chloop));
return hide_evolution_in_other_loops_than_loop (CHREC_LEFT (chrec),
loop_num);
}
return chrec_dont_know;
default:
return chrec;