> I have 4 regressions in the C testsuite with -mflat on SPARC/Solaris:

And 2 regressions in 64-bit mode:

FAIL: gcc.c-torture/execute/nestfunc-6.c execution,  -O1
[...]

FAIL: gcc.dg/torture/stackalign/nested-6.c  -O1  execution test
[...]


Another latent problem exposed by the change.  Tested on SPARC/Solaris, applied 
on the mainline.


2011-06-27  Eric Botcazou  <ebotca...@adacore.com>

        * config/sparc/sparc.c (sparc_frame_pointer_required): Return true if
        the function receives nonlocal gotos.


-- 
Eric Botcazou
Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c	(revision 175408)
+++ config/sparc/sparc.c	(working copy)
@@ -10153,6 +10153,11 @@ sparc_frame_pointer_required (void)
   if (cfun->calls_alloca)
     return true;
 
+  /* If the function receives nonlocal gotos, it needs to save the frame
+     pointer in the nonlocal_goto_save_area object.  */
+  if (cfun->has_nonlocal_label)
+    return true;
+
   /* In flat mode, that's it.  */
   if (TARGET_FLAT)
     return false;

Reply via email to