mirror of git://gcc.gnu.org/git/gcc.git
re PR debug/45259 (ICE in save_call_clobbered_regs)
PR debug/45259 * caller-save.c (save_call_clobbered_regs): Only swap notes with DEBUG_INSNs if n_regs_saved. * gcc.dg/pr45259.c: New test. From-SVN: r163185
This commit is contained in:
parent
3565ffedc8
commit
49b48605c8
|
|
@ -1,3 +1,9 @@
|
|||
2010-08-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/45259
|
||||
* caller-save.c (save_call_clobbered_regs): Only swap notes with
|
||||
DEBUG_INSNs if n_regs_saved.
|
||||
|
||||
2010-08-12 Wei Guozhi <carrot@google.com>
|
||||
|
||||
PR target/44999
|
||||
|
|
|
|||
|
|
@ -868,7 +868,10 @@ save_call_clobbered_regs (void)
|
|||
remain saved. If the last insn in the block is a JUMP_INSN, put
|
||||
the restore before the insn, otherwise, put it after the insn. */
|
||||
|
||||
if (DEBUG_INSN_P (insn) && last && last->block == chain->block)
|
||||
if (n_regs_saved
|
||||
&& DEBUG_INSN_P (insn)
|
||||
&& last
|
||||
&& last->block == chain->block)
|
||||
{
|
||||
rtx ins, prev;
|
||||
basic_block bb = BLOCK_FOR_INSN (insn);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2010-08-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/45259
|
||||
* gcc.dg/pr45259.c: New test.
|
||||
|
||||
2010-08-12 Wei Guozhi <carrot@google.com>
|
||||
|
||||
PR target/44999
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
/* PR debug/45259 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-g -O2 -fpic -w" { target fpic } } */
|
||||
|
||||
struct S { void (*bar) (long); };
|
||||
struct T { struct S *t; };
|
||||
int w;
|
||||
extern int baz (int);
|
||||
|
||||
void
|
||||
foo (int x, int u, char *z)
|
||||
{
|
||||
struct T *v;
|
||||
static void *y[256] = { &&l1, &&l2 };
|
||||
for (;;)
|
||||
switch (x)
|
||||
{
|
||||
l2:
|
||||
x = 9;
|
||||
case 9:
|
||||
goto *y[*z++];
|
||||
case 10:
|
||||
case 27:
|
||||
case 54:
|
||||
case 99:
|
||||
case 100:
|
||||
case 120:
|
||||
case 122:
|
||||
case 131:
|
||||
case 132:
|
||||
case 134:
|
||||
case 141:
|
||||
case 142:
|
||||
v->t->bar (u);
|
||||
v->t->bar (u);
|
||||
case 143:
|
||||
continue;
|
||||
l1:
|
||||
default:
|
||||
baz (w);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue