re PR debug/44223 (segmentation fault with -g -fsched-pressure)
PR debug/44223 * haifa-sched.c (schedule_insn): When freeing INSN_REG_USE_LIST, unchain each use from the cyclic next_regno_use chain first. * gcc.target/i386/pr44223.c: New test. From-SVN: r159680
This commit is contained in:
parent
d49b6e1e33
commit
14db98d4a6
|
@ -1,3 +1,9 @@
|
|||
2010-05-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/44223
|
||||
* haifa-sched.c (schedule_insn): When freeing INSN_REG_USE_LIST,
|
||||
unchain each use from the cyclic next_regno_use chain first.
|
||||
|
||||
2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* real: Do not include gmp.h, mpfr.h, and mpc.h.
|
||||
|
|
|
@ -1721,6 +1721,12 @@ schedule_insn (rtx insn)
|
|||
/* Unknown location doesn't use any registers. */
|
||||
for (use = INSN_REG_USE_LIST (dbg); use != NULL; use = next)
|
||||
{
|
||||
struct reg_use_data *prev = use;
|
||||
|
||||
/* Remove use from the cyclic next_regno_use chain first. */
|
||||
while (prev->next_regno_use != use)
|
||||
prev = prev->next_regno_use;
|
||||
prev->next_regno_use = use->next_regno_use;
|
||||
next = use->next_insn_use;
|
||||
free (use);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-05-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/44223
|
||||
* gcc.target/i386/pr44223.c: New test.
|
||||
|
||||
2010-05-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* gcc.target/i386/pr25993.c: Use @function as type specifier.
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/* PR debug/44223 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O3 -fsched-pressure -fschedule-insns -fpic -march=core2 -g" { target fpic } } */
|
||||
|
||||
struct S { unsigned int s1; int s2; };
|
||||
struct T { int t; };
|
||||
|
||||
extern void extfn (struct S *);
|
||||
|
||||
static inline void
|
||||
foo (struct S *s, unsigned char *x, int y)
|
||||
{
|
||||
s->s2 = 32;
|
||||
}
|
||||
|
||||
static inline void
|
||||
bar (struct S *s, int n, unsigned int x)
|
||||
{
|
||||
unsigned int s1;
|
||||
int s2;
|
||||
s1 = s->s1;
|
||||
s2 = s->s2;
|
||||
if (n < s2)
|
||||
s1 = (s1 << n) | x;
|
||||
s->s1 = s1;
|
||||
}
|
||||
|
||||
int
|
||||
baz (struct T *u, unsigned char *v, int w)
|
||||
{
|
||||
struct S y;
|
||||
foo (&y, v, 7);
|
||||
bar (&y, 12, 0xfff);
|
||||
bar (&y, 2, u->t);
|
||||
extfn (&y);
|
||||
}
|
Loading…
Reference in New Issue