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]

Re: [patches] Re: Fix unused-2.c failure


> On Thu, Jul 19, 2001 at 06:10:18PM +0200, Jan Hubicka wrote:
> > Does some other code do that as well? (probably code to emit does),
> 
> Yes, final.

Thu Jul 19 18:19:44 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* integrate.c (copy_insn_list): handle
	NOTE_INSN_DELETED_LABEL, as if it were CODE_LABEL.
	(copy_rtx_and_substitute): Behave to NOTE_INSN_DELETED_LABEL
	identically as to CODE_LABEL.

Index: integrate.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/integrate.c,v
retrieving revision 1.152
diff -c -3 -p -r1.152 integrate.c
*** integrate.c	2001/07/18 06:35:24	1.152
--- integrate.c	2001/07/19 16:19:33
*************** copy_insn_list (insns, map, static_chain
*** 1555,1560 ****
--- 1555,1568 ----
  	  break;
  
  	case NOTE:
+ 	  if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL)
+ 	    {
+ 	      copy = emit_label (get_label_from_map (map,
+ 						    CODE_LABEL_NUMBER (insn)));
+ 	      map->const_age++;
+ 	      break;
+ 	    }
+ 
  	  /* NOTE_INSN_FUNCTION_END and NOTE_INSN_FUNCTION_BEG are
  	     discarded because it is important to have only one of
  	     each in the current function.
*************** copy_rtx_and_substitute (orig, map, for_
*** 1992,2008 ****
  	copy = SUBREG_REG (copy);
        return gen_rtx_fmt_e (code, VOIDmode, copy);
  
      case CODE_LABEL:
        LABEL_PRESERVE_P (get_label_from_map (map, CODE_LABEL_NUMBER (orig)))
  	= LABEL_PRESERVE_P (orig);
        return get_label_from_map (map, CODE_LABEL_NUMBER (orig));
- 
-     /* We need to handle "deleted" labels that appear in the DECL_RTL
-        of a LABEL_DECL.  */
-     case NOTE:
-       if (NOTE_LINE_NUMBER (orig) == NOTE_INSN_DELETED_LABEL)
- 	return map->insn_map[INSN_UID (orig)];
-       break;
  
      case LABEL_REF:
        copy
--- 2000,2016 ----
  	copy = SUBREG_REG (copy);
        return gen_rtx_fmt_e (code, VOIDmode, copy);
  
+     /* We need to handle "deleted" labels that appear in the DECL_RTL
+        of a LABEL_DECL.  */
+     case NOTE:
+       if (NOTE_LINE_NUMBER (orig) != NOTE_INSN_DELETED_LABEL)
+ 	break;
+ 
+       /* ... FALLTHRU ... */
      case CODE_LABEL:
        LABEL_PRESERVE_P (get_label_from_map (map, CODE_LABEL_NUMBER (orig)))
  	= LABEL_PRESERVE_P (orig);
        return get_label_from_map (map, CODE_LABEL_NUMBER (orig));
  
      case LABEL_REF:
        copy


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