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]

Re: [PATCH] prevents labels referenced in the exception table to be deleted


Here is the tiny patch, validated on i686-pc-linux-gnu and sh4-linux.

To recall, it fixes a bug exposed during the SH validation testsuite for 42841 on the trunk branch only (23_containers/deque/requirements/exception/basic.cc failed with Error: undefined symbol `.L3394' in operation). Note that Kaz as made a w/a in the SH description to remove the regression in the current build.

In branches 4.3, 4.4 landing pad labels were correctly PRESERVED. So this flags is lost since recently.
Only reorg calls delete_related_insn after the exception handling tables, so this might has been left unnoticed for primary targets such as x86.
Landing pads for sjlj exceptions are correctly preserved. It is missing only for dwarf2 exceptions.


OK ? It should be safe for the 4.5 but I understand to wait until stage 1 if necessary.

thanks

Christian




2010-02-12  Christian Bruel  <christian.bruel@st.com>

	* except.c (dw2_build_landing_pads): set LABEL_PRESERVE_P.

Index: except.c
===================================================================
--- except.c	(revision 156703)
+++ except.c	(working copy)
@@ -975,6 +975,8 @@
       lp->landing_pad = gen_label_rtx ();
       emit_label (lp->landing_pad);
 
+      LABEL_PRESERVE_P (lp->landing_pad) = 1;
+
 #ifdef HAVE_exception_receiver
       if (HAVE_exception_receiver)
 	emit_insn (gen_exception_receiver ());

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