diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-08-12 11:04:48 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-08-12 11:04:48 +0200 |
commit | 49b48605c822542b0ce623db4d5188ed3ae79401 (patch) | |
tree | 05dfe66d78ab3b75054cabbf2e7413b15c243fc9 /gcc/caller-save.c | |
parent | 3565ffedc8f301d0f13d7c5d2aa89ea8261c2299 (diff) | |
download | gcc-49b48605c822542b0ce623db4d5188ed3ae79401.tar.gz |
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
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index 446da51acdf..9ca8592bf34 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -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); |