Patchwork [RS6000] Fix ICE in reg_save

login
register
mail settings
Submitter Alan Modra
Date Aug. 2, 2011, 5:13 a.m.
Message ID <20110802051342.GF26813@bubble.grove.modra.org>
Download mbox | patch
Permalink /patch/107839/
State New
Headers show

Comments

Alan Modra - Aug. 2, 2011, 5:13 a.m.
Seen when running binutils testsuite on powerpc-linux.
.../ld-elfvers/vers24b.c: In function 'foo':
.../ld-elfvers/vers24b.c:5:1: internal compiler error: in reg_save, at dwarf2cfi.c:827

Bootstrapped and regression tested powerpc-linux.  Committed as obvious.

	* config/rs6000/rs6000.c (rs6000_emit_prologue): Add REG_CFA_RESTORE
	note for save_LR_around_toc_setup sequence.

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 177041)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -20505,6 +20505,7 @@  rs6000_emit_prologue (void)
 	  rs6000_emit_load_toc_table (TRUE);
 
 	  insn = emit_move_insn (lr, frame_ptr_rtx);
+	  add_reg_note (insn, REG_CFA_RESTORE, lr);
 	  RTX_FRAME_RELATED_P (insn) = 1;
 	}
       else