re PR debug/63285 (-fcompare-debug scheduler related failure)

2014-09-18  Vladimir Makarov  <vmakarov@redhat.com>

	PR debug/63285
	* haifa-sched.c (schedule_block): Advance cycle at the end of BB
	if advance != 0.

2014-09-18  Vladimir Makarov  <vmakarov@redhat.com>

	PR debug/63285
	* gcc.target/i386/pr63285.c: New test.

From-SVN: r215364
This commit is contained in:
Vladimir Makarov 2014-09-18 19:14:19 +00:00 committed by Vladimir Makarov
parent f4d5fe4732
commit 2fb5f0da9d
4 changed files with 40 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR debug/63285
* haifa-sched.c (schedule_block): Advance cycle at the end of BB
if advance != 0.
2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR target/61360

View File

@ -6473,7 +6473,7 @@ schedule_block (basic_block *target_bb, state_t init_state)
if (ls.modulo_epilogue)
success = true;
end_schedule:
if (!ls.first_cycle_insn_p)
if (!ls.first_cycle_insn_p || advance)
advance_one_cycle ();
perform_replacements_new_cycle ();
if (modulo_ii > 0)

View File

@ -1,3 +1,8 @@
2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR debug/63285
* gcc.target/i386/pr63285.c: New test.
2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR target/61360

View File

@ -0,0 +1,28 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */
struct S { int a; };
struct T { int b, c; } a;
long b;
int c, d;
void bar (int, int);
void baz (void *, int);
void
foo (struct S *x, int y, int z, void *f, int *p, struct T *e)
{
while (x)
{
baz (f, &d > p);
if (z & 1)
bar (f > (void *) &f, z);
}
if (c)
{
asm ("" : "+m" (a) : "i" (0));
y--;
}
if (e->b == e->c)
c = y;
y--;
}