diff mbox

Fix computed gotos on m68k

Message ID 20111028115341.533a5256@rex.config
State New
Headers show

Commit Message

Julian Brown Oct. 28, 2011, 10:53 a.m. UTC
On Tue, 25 Oct 2011 14:49:09 +0200
Eric Botcazou <ebotcazou@adacore.com> wrote:

> These labels are on the nonlocal_goto_handler_labels chain.  You
> presumably just need to apply the same treatment to them in
> set_initial_label_offsets as the one applied to forced labels.

> OK for the adjusted patch if it works, mainline and 4.6 branch once
> it reopens. Please mention PR rtl-optimization/47918 in the ChangeLog.

Thanks -- I've committed this (much cleaner) version to mainline,
after re-testing. I'll see about testing it on 4.6 also.

Cheers,

Julian

Comments

Julian Brown Nov. 1, 2011, 6:43 p.m. UTC | #1
On Fri, 28 Oct 2011 11:53:41 +0100
Julian Brown <julian@codesourcery.com> wrote:

> On Tue, 25 Oct 2011 14:49:09 +0200
> Eric Botcazou <ebotcazou@adacore.com> wrote:
> 
> > These labels are on the nonlocal_goto_handler_labels chain.  You
> > presumably just need to apply the same treatment to them in
> > set_initial_label_offsets as the one applied to forced labels.
> 
> > OK for the adjusted patch if it works, mainline and 4.6 branch once
> > it reopens. Please mention PR rtl-optimization/47918 in the
> > ChangeLog.
> 
> Thanks -- I've committed this (much cleaner) version to mainline,
> after re-testing. I'll see about testing it on 4.6 also.

I've now committed the patch on 4.6 also. I did need to apply the
following patch from Bernd in order to test the 4.6 branch tip
successfully, since without it my build blew up in glibc with an error
in final.c:

  http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00454.html

Maybe that patch should be applied to 4.6 also?

Thanks,

Julian
Eric Botcazou Nov. 1, 2011, 10:52 p.m. UTC | #2
> I've now committed the patch on 4.6 also. I did need to apply the
> following patch from Bernd in order to test the 4.6 branch tip
> successfully, since without it my build blew up in glibc with an error
> in final.c:
>
>   http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00454.html
>
> Maybe that patch should be applied to 4.6 also?

Fine with me, this is a regression; please backport the testcase as well.  TIA.
diff mbox

Patch

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 180610)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,10 @@ 
+2011-10-28  Julian Brown  <julian@codesourcery.com>
+
+	PR rtl-optimization/47918
+
+	* reload1.c (set_initial_label_offsets): Use initial offsets
+	for labels on the nonlocal_goto_handler_labels chain.
+
 2011-10-28  Iain Sandoe  <iains@gcc.gnu.org>
 
 	* config/rs6000/t-darwin (LIB2FUNCS_STATIC_EXTRA): 
Index: gcc/reload1.c
===================================================================
--- gcc/reload1.c	(revision 180610)
+++ gcc/reload1.c	(working copy)
@@ -3918,6 +3918,10 @@  set_initial_label_offsets (void)
     if (XEXP (x, 0))
       set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
 
+  for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1))
+    if (XEXP (x, 0))
+      set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
+
   for_each_eh_label (set_initial_eh_label_offset);
 }