+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.
sd_iterator_cond (&sd_it, &dep);)
{
rtx dbg = DEP_PRO (dep);
+ struct reg_use_data *use, *next;
gcc_assert (DEBUG_INSN_P (dbg));
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. */
--- /dev/null
+/* 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);
+}