Commit 9e3de74c by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/59166 (ICE in simplify_subreg, at simplify-rtx.c:5901 on…

re PR rtl-optimization/59166 (ICE in simplify_subreg, at simplify-rtx.c:5901 on valid code (at -O1 and above with -g enabled))

	PR rtl-optimization/59166
	* ira.c (find_moveable_pseudos): Use DF_REF_REAL_LOC instead of
	DF_REF_LOC in validate_change call.
	(split_live_ranges_for_shrink_wrap): Likewise.

	* gcc.dg/torture/pr59166.c: New test.

From-SVN: r205413
parent 5999f07f
2013-11-26 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/59166
* ira.c (find_moveable_pseudos): Use DF_REF_REAL_LOC instead of
DF_REF_LOC in validate_change call.
(split_live_ranges_for_shrink_wrap): Likewise.
PR middle-end/59150
* omp-low.c (lower_rec_input_clause): For reduction with placeholder
of references to constant size types in simd loops, defer emitting
......@@ -4812,7 +4812,7 @@ find_moveable_pseudos (void)
{
rtx def_reg = DF_REF_REG (def);
rtx newreg = ira_create_new_reg (def_reg);
if (validate_change (def_insn, DF_REF_LOC (def), newreg, 0))
if (validate_change (def_insn, DF_REF_REAL_LOC (def), newreg, 0))
{
unsigned nregno = REGNO (newreg);
emit_insn_before (gen_move_insn (def_reg, newreg), use_insn);
......@@ -5034,7 +5034,7 @@ split_live_ranges_for_shrink_wrap (void)
rtx newreg = NULL_RTX;
df_ref use, next;
for (use = DF_REG_USE_CHAIN (REGNO(dest)); use; use = next)
for (use = DF_REG_USE_CHAIN (REGNO (dest)); use; use = next)
{
rtx uin = DF_REF_INSN (use);
next = DF_REF_NEXT_REG (use);
......@@ -5045,7 +5045,7 @@ split_live_ranges_for_shrink_wrap (void)
{
if (!newreg)
newreg = ira_create_new_reg (dest);
validate_change (uin, DF_REF_LOC (use), newreg, true);
validate_change (uin, DF_REF_REAL_LOC (use), newreg, true);
}
}
......
2013-11-26 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/59166
* gcc.dg/torture/pr59166.c: New test.
PR c++/58874
* g++.dg/gomp/pr58874.C: New test.
......
/* PR rtl-optimization/59166 */
/* { dg-additional-options "-fcompare-debug" } */
int a, b, c, f, g;
void
foo ()
{
for (; b; b++)
for (; f; f = g)
for (; a;)
;
}
static int
bar (int p)
{
short d;
if (c)
{
for (; f; f = g);
foo ();
d = p;
char e = d;
if (p)
return 1;
}
return p;
}
int
main ()
{
bar (0);
bar (g);
return 0;
}
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