Commit 1de12eab by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/44028 (-fcompare-debug failure (length) with -O3 -fsched-pressure -fschedule-insns)

	PR debug/44028
	* haifa-sched.c (schedule_insn): When clearing INSN_VAR_LOCATION_LOC,
	clear also INSN_REG_USE_LIST.

	* gcc.dg/pr44028.c: New test.

From-SVN: r159240
parent e472d6bf
2010-05-10 Jakub Jelinek <jakub@redhat.com>
PR debug/44028
* haifa-sched.c (schedule_insn): When clearing INSN_VAR_LOCATION_LOC,
clear also INSN_REG_USE_LIST.
2010-05-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/mips/mips.c (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Undef.
......
......@@ -1695,6 +1695,7 @@ schedule_insn (rtx insn)
sd_iterator_cond (&sd_it, &dep);)
{
rtx dbg = DEP_PRO (dep);
struct reg_use_data *use, *next;
gcc_assert (DEBUG_INSN_P (dbg));
......@@ -1716,6 +1717,14 @@ schedule_insn (rtx insn)
INSN_VAR_LOCATION_LOC (dbg) = gen_rtx_UNKNOWN_VAR_LOC ();
df_insn_rescan (dbg);
/* Unknown location doesn't use any registers. */
for (use = INSN_REG_USE_LIST (dbg); use != NULL; use = next)
{
next = use->next_insn_use;
free (use);
}
INSN_REG_USE_LIST (dbg) = NULL;
/* We delete rather than resolve these deps, otherwise we
crash in sched_free_deps(), because forward deps are
expected to be released before backward deps. */
......
2010-05-10 Jakub Jelinek <jakub@redhat.com>
PR debug/44028
* gcc.dg/pr44028.c: New test.
2010-05-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/27866
......
/* PR debug/44028 */
/* { dg-do compile } */
/* { dg-options "-O3 -fcompare-debug" } */
/* { dg-options "-O3 -fsched-pressure -fschedule-insns -fcompare-debug" { target i?86-*-* x86_64-*-* } } */
struct S { int val[16]; };
static inline int
bar (struct S x)
{
long double pc = 0;
int i;
for (i = 0; i < 16; i++)
pc += x.val[i];
return pc;
}
int
foo (struct S x)
{
return bar (x);
}
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