Patchwork [alpha] : Fix PR bootstrap/48214: ICE in dwarf2out_var_location

login
register
mail settings
Submitter Uros Bizjak
Date March 21, 2011, 6:40 p.m.
Message ID <AANLkTinOYS3eO1871pAnqcVDDiaQ=e9_RFwNf4eejsmk@mail.gmail.com>
Download mbox | patch
Permalink /patch/87814/
State New
Headers show

Comments

Uros Bizjak - March 21, 2011, 6:40 p.m.
Hello!

Attached patch fixes recent bootstrap failure on alpha-pc-linux-gnu in
in dwarf2out_var_location, at dwarf2out.c:21983.

2011-03-21  Uros Bizjak  <ubizjak@gmail.com>

	* config/alpha/alpha.c (alpha_pad_noreturn): Do not emit an unop
	between a call and its CALL_ARG_LOCATION note.

Bootstrapped and regression tested on alphaev68-pc-linux-gnu. OK for
mainline SVN?

Uros.
Richard Henderson - March 21, 2011, 7:55 p.m.
On 03/21/2011 11:40 AM, Uros Bizjak wrote:
> Hello!
> 
> Attached patch fixes recent bootstrap failure on alpha-pc-linux-gnu in
> in dwarf2out_var_location, at dwarf2out.c:21983.
> 
> 2011-03-21  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* config/alpha/alpha.c (alpha_pad_noreturn): Do not emit an unop
> 	between a call and its CALL_ARG_LOCATION note.

Ok.


r~

Patch

Index: alpha.c
===================================================================
--- alpha.c	(revision 171208)
+++ alpha.c	(working copy)
@@ -9644,10 +9644,20 @@  alpha_pad_noreturn (void)
 
   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
     {
-      if (!CALL_P (insn)
-	  || !find_reg_note (insn, REG_NORETURN, NULL_RTX))
+      if (! (CALL_P (insn)
+	     && find_reg_note (insn, REG_NORETURN, NULL_RTX)))
         continue;
 
+      /* Make sure we do not split a call and its corresponding
+	 CALL_ARG_LOCATION note.  */
+      if (CALL_P (insn))
+	{
+	  next = NEXT_INSN (insn);
+	  if (next && NOTE_P (next)
+	      && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
+	    insn = next;
+	}
+
       next = next_active_insn (insn);
 
       if (next)