This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[vta, vta4.4] relax no-notes-in-debug-insns test in reg-stack


On Jul 31, 2009, Jakub Jelinek <jakub@redhat.com> wrote:

> Another regression I've looked at is
> -m32 -O3 -g -fno-bounds-check gfortran.dg/g77/dnrm2.f
> on x86-64/i686.  Here we ICE on:
> 2963                  /* Nothing must ever die at a debug insn.  If something
> 2964                     is referenced in it that becomes dead, it should have
> 2965                     died before and the reference in the debug insn
> 2966                     should have been removed so as to avoid changing code
> 2967                     generation.  */
> 2968                  gcc_assert (!REG_NOTES (insn));
> in reg-stack.c.  insn is:
> (debug_insn 126 125 127 32 (var_location:SI next.2 (label_ref:SI 141)) -1 (insn_list:REG_LABEL_OPERAND 141 (nil)))
> Do you really mean it must not contain any REG_NOTES, or just not any
> REG_DEAD notes (or any other kind that must not happen there)?

I thought it meant no REG_NOTES, but I didn't realize REG_LABEL_OPERAND
could be there.  I don't see that any other notes could, but reg-stack
isn't really the right place to test for more than REG_DEAD (and even
that might go away), but this patch fixes it.

I'll give it a round of testing and then install it in vta and vta4.4.

Thanks!

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* reg-stack.c (convert_regs_1): Reject only REG_DEAD notes.

Index: gcc/reg-stack.c
===================================================================
--- gcc/reg-stack.c.orig	2009-06-17 06:17:38.000000000 -0300
+++ gcc/reg-stack.c	2009-08-04 07:00:22.000000000 -0300
@@ -2965,7 +2965,7 @@ convert_regs_1 (basic_block block)
 		 died before and the reference in the debug insn
 		 should have been removed so as to avoid changing code
 		 generation.  */
-	      gcc_assert (!REG_NOTES (insn));
+	      gcc_assert (!find_reg_note (insn, REG_DEAD, NULL));
 	    }
 	}
       else if (stack_regs_mentioned (insn)
-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]