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]

[RFA:] Handle NOTE_INSN_DELETED_LABELs in output_addr_const


A forgotten case of label-turned-note/deleted-for-flow-purposes;
output_addr_const couldn't output it.  Happens for the cris-axis-linux-gnu
when compiling libstdc++-v3/src/string-inst.cc -fPIC.  (This target
temporarily uses sjlj EH, but that will change before it's committed.)
The pseudo-deleted label seems to be the address of a landing pad set up
from the "normal flow", so the deletedness seems correct.

Bootstrapped and checked on i686-pc-linux-gnu.  Built and checked on
arm-elf+arm-sim, h8300-hitachi-hms+h8300-sim (with
--enable-languages=objc), i960-coff+i960-sim (with
--enable-languages=c++,f77,java), mips-elf+mips-sim,
mn10300-elf+mn10300-sim and powerpc-eabisim+powerpc-sim with no
regressions.

Ok to commit?

	* final.c (output_addr_const): Handle labels turned into notes.

Index: gcc/final.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/final.c,v
retrieving revision 1.204
diff -p -c -r1.204 final.c
*** final.c	2001/08/27 17:29:57	1.204
--- final.c	2001/09/24 13:37:45
*************** output_addr_const (file, x)
*** 3558,3563 ****
--- 3558,3564 ----
      case LABEL_REF:
        x = XEXP (x, 0);
        /* Fall through.  */
+     handle_code_label:
      case CODE_LABEL:
        ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x));
        assemble_name (file, buf);
*************** output_addr_const (file, x)
*** 3636,3641 ****
--- 3637,3648 ----
        output_addr_const (file, XEXP (x, 0));
        break;
  
+     case NOTE:
+       /* This might be a pseudo-deleted label, which is supposed to be
+ 	 handled exactly as a CODE_LABEL.  */
+       if (NOTE_LINE_NUMBER (x) == NOTE_INSN_DELETED_LABEL)
+ 	goto handle_code_label;
+       /* Fall through.  */
      default:
  #ifdef OUTPUT_ADDR_CONST_EXTRA
        OUTPUT_ADDR_CONST_EXTRA (file, x, fail);

brgds, H-P


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