re PR middle-end/60597 (ICE in df_refs_verify, at df-scan.c:4323)

PR middle-end/60597
	* ira.c (adjust_cleared_regs): Call copy_rtx on
	*reg_equiv[REGNO (loc)].src_p before passing it to
	simplify_replace_fn_rtx.

	* g++.dg/opt/pr60597.C: New test.

From-SVN: r208735
This commit is contained in:
Jakub Jelinek 2014-03-20 20:47:09 +01:00 committed by Jakub Jelinek
parent 7614d42cb4
commit b8f045e2e4
4 changed files with 55 additions and 1 deletions

View File

@ -1,5 +1,10 @@
2014-03-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/60597
* ira.c (adjust_cleared_regs): Call copy_rtx on
*reg_equiv[REGNO (loc)].src_p before passing it to
simplify_replace_fn_rtx.
PR target/60568
* config/i386/i386.c (x86_output_mi_thunk): Surround UNSPEC_GOT
into CONST, put pic register as first operand of PLUS. Use

View File

@ -3428,7 +3428,7 @@ adjust_cleared_regs (rtx loc, const_rtx old_rtx ATTRIBUTE_UNUSED, void *data)
{
bitmap cleared_regs = (bitmap) data;
if (bitmap_bit_p (cleared_regs, REGNO (loc)))
return simplify_replace_fn_rtx (*reg_equiv[REGNO (loc)].src_p,
return simplify_replace_fn_rtx (copy_rtx (*reg_equiv[REGNO (loc)].src_p),
NULL_RTX, adjust_cleared_regs, data);
}
return NULL_RTX;

View File

@ -1,5 +1,8 @@
2014-03-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/60597
* g++.dg/opt/pr60597.C: New test.
PR c++/60572
* g++.dg/init/pr60572.C: New test.

View File

@ -0,0 +1,46 @@
// PR middle-end/60597
// { dg-do compile }
// { dg-options "-O2 -g" }
struct A
{
int foo () const;
int bar () const;
int a;
};
struct B
{
int foo ();
int bar ();
};
int *c, d;
int
A::foo () const
{
int b = a >> 16;
return b;
}
int
A::bar () const
{
int b = a;
return b;
}
void
baz (A &x, B h, int i, int j)
{
for (; i < h.bar (); ++i)
for (; h.foo (); ++j)
{
int g = x.foo ();
int f = x.bar ();
int e = c[0] & 1;
d = (e << 1) | (g << 16) | (f & 1);
c[j] = 0;
}
}