re PR target/19340 (Compilation SEGFAULTs with -O1 -fschedule-insns2 -fsched2-use-traces on an x86 architecture.)

PR target/19340
	* reg-stack.c (reg_to_stack): Update register liveness also
	for flag_sched2_use_traces.

testsuite/

	PR target/19340
	* gcc.dg/pr19340.c: New test.

From-SVN: r106632
This commit is contained in:
Uros Bizjak 2005-11-08 07:21:51 +01:00 committed by Uros Bizjak
parent 2c9c9afdba
commit dfea1f6121
4 changed files with 39 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-11-08 Uros Bizjak <uros@kss-loka.si>
PR target/19340
* reg-stack.c (reg_to_stack): Update register liveness also
for flag_sched2_use_traces.
2005-11-08 Alan Modra <amodra@bigpond.net.au>
PR target/23704

View File

@ -3046,7 +3046,7 @@ reg_to_stack (FILE *file)
Also need to rebuild life when superblock scheduling is done
as it don't update liveness yet. */
if (!optimize
|| (flag_sched2_use_superblocks
|| ((flag_sched2_use_superblocks || flag_sched2_use_traces)
&& flag_schedule_insns_after_reload))
{
count_or_remove_death_notes (NULL, 1);

View File

@ -1,3 +1,8 @@
2005-11-08 Uros Bizjak <uros@kss-loka.si>
PR target/19340
* gcc.dg/pr19340.c: New test.
2005-11-07 Ian Lance Taylor <ian@airs.com>
PR rtl-optimization/24683
@ -5,7 +10,7 @@
2005-11-07 Uros Bizjak <uros@kss-loka.si>
* gcc.dg/vect/pr24225.c: Add cleanup-coverage-files.
* gcc.dg/pr24225.c: Add cleanup-coverage-files.
* gcc.dg/vect/pr24300.c: Add cleanup-tree-dump.
2005-11-07 Uros Bizjak <uros@kss-loka.si>

View File

@ -0,0 +1,26 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fschedule-insns2 -fsched2-use-traces" } */
extern double f (double x);
double g (int a)
{
int b, c, d, e = 0;
double h;
for (d = 0; d < a; d++)
for (c = 0; c < a; c++)
b = 1;
h = (double) e / (double) a;
if (h)
{
h = 1.0 / h;
h = f (h);
}
else
h = 1.0;
return h;
}