copy_rtx avoids duplicating DEBUG_EXPRs, so that they map one-to-one to
DEBUG_EXPR_DECLs, but copy_insn lacks these smarts.  This was exposed by
a patch I'm working on, that uses RTL flags in DEBUG_EXPRs to speed up
expansion of var location notes within var-tracking.

Regstrapped on i686-pc-linux-gnu and x86_64-linux-gnu.  Ok to install?

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

	* emit-rtl.c (copy_insn_1): Do not copy DEBUG_EXPRs.

Index: gcc/emit-rtl.c
===================================================================
--- gcc/emit-rtl.c.orig	2011-09-15 03:51:41.982777588 -0300
+++ gcc/emit-rtl.c	2011-09-15 03:51:50.767633680 -0300
@@ -5269,6 +5269,7 @@ copy_insn_1 (rtx orig)
   switch (code)
     {
     case REG:
+    case DEBUG_EXPR:
     case CONST_INT:
     case CONST_DOUBLE:
     case CONST_FIXED:

-- 
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

Reply via email to