From 157b930011390a269e71c22d51d511f91a03e6e5 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 27 Jun 2011 11:07:55 +0000 Subject: [PATCH] sparc.c (sparc_frame_pointer_required): Return true if the function receives nonlocal gotos. * config/sparc/sparc.c (sparc_frame_pointer_required): Return true if the function receives nonlocal gotos. From-SVN: r175477 --- gcc/ChangeLog | 5 +++++ gcc/config/sparc/sparc.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6e12f14b3a..ba26774f152 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-06-27 Eric Botcazou + + * config/sparc/sparc.c (sparc_frame_pointer_required): Return true if + the function receives nonlocal gotos. + 2011-06-27 Richard Guenther PR tree-optimization/49536 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index c5f159a05ac..89e09d67269 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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;