[Bug target/79749] Many sparc testcases FAIL at -O0 with -fomit-frame-pointer

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 28 17:11:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79749

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-02-28
     Ever confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> In that case (haven't tried others) the failure already exists with gcc 3.4.6.

Indeed, an old oversight, the fix is probably just:

Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c        (revision 245767)
+++ config/sparc/sparc.c        (working copy)
@@ -12181,7 +12181,7 @@ sparc_frame_pointer_required (void)
     return false;

   /* Otherwise, the frame pointer is required if the function isn't leaf.  */
-  return !(crtl->is_leaf && only_leaf_regs_used ());
+  return !sparc_leaf_function_p;
 }

 /* The way this is structured, we can't eliminate SFP in favor of SP


More information about the Gcc-bugs mailing list