aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2010-09-09 13:53:32 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2010-09-09 13:53:32 +0000
commitde8e52f063c997bed974210186c9105e9c0a019d (patch)
treec7e55143b7b9838e9708e7117f3582b97d9d2634 /gcc/ira.c
parent5fdc49eca660d130ec4815eb7a804aa7fd89773d (diff)
downloadgcc-de8e52f063c997bed974210186c9105e9c0a019d.zip
gcc-de8e52f063c997bed974210186c9105e9c0a019d.tar.gz
gcc-de8e52f063c997bed974210186c9105e9c0a019d.tar.bz2
re PR middle-end/44554 (Stack space after sigsetjmp is reused)
2010-09-09 Vladimir Makarov <vmakarov@redhat.com> PR middle-end/44554 * ira.c (ira): Switch off sharing spill slots if setjmp is called. From-SVN: r164102
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index a38808c..e4dd2d3 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -3178,9 +3178,12 @@ ira (FILE *f)
ira_assert (ira_conflicts_p || !loops_p);
saved_flag_ira_share_spill_slots = flag_ira_share_spill_slots;
- if (too_high_register_pressure_p ())
+ if (too_high_register_pressure_p () || cfun->calls_setjmp)
/* It is just wasting compiler's time to pack spilled pseudos into
- stack slots in this case -- prohibit it. */
+ stack slots in this case -- prohibit it. We also do this if
+ there is setjmp call because a variable not modified between
+ setjmp and longjmp the compiler is required to preserve its
+ value and sharing slots does not guarantee it. */
flag_ira_share_spill_slots = FALSE;
ira_color ();