diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-08-22 18:58:50 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-08-22 18:58:50 +0200 |
commit | 27004606de459d624247190ca0f752a9a9a7b76f (patch) | |
tree | a84c1cb04ef05b13f2b4cd991e221d8edbf8e2ec /gcc/global.c | |
parent | ad685e8112bbaf64ff9ee993cb189feaa869e741 (diff) | |
download | gcc-27004606de459d624247190ca0f752a9a9a7b76f.zip gcc-27004606de459d624247190ca0f752a9a9a7b76f.tar.gz gcc-27004606de459d624247190ca0f752a9a9a7b76f.tar.bz2 |
re PR rtl-optimization/23478 (Miscompilation due to reloading of a var that is also used in EH pad)
PR rtl-optimization/23478
* regs.h (reg_info): Add throw_calls_crossed.
(REG_N_THROWING_CALLS_CROSSED): Define.
* flow.c (allocate_reg_life_data): Initialize
REG_N_THROWING_CALLS_CROSSED.
(propagate_one_insn, attempt_auto_inc): Update
REG_N_THROWING_CALLS_CROSSED.
* global.c (global_alloc): Don't allocate pseudos across
calls that may throw.
* g++.dg/opt/pr23478.C: New test.
From-SVN: r103348
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/global.c b/gcc/global.c index 13b8173..f82cd08 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -465,7 +465,9 @@ global_alloc (FILE *file) /* Don't allocate pseudos that cross calls, if this function receives a nonlocal goto. */ && (! current_function_has_nonlocal_label - || REG_N_CALLS_CROSSED (i) == 0)) + || REG_N_CALLS_CROSSED (i) == 0) + /* Don't allocate pseudos that cross calls that may throw. */ + && REG_N_THROWING_CALLS_CROSSED (i) == 0) { if (reg_renumber[i] < 0 && reg_may_share[i] && reg_allocno[reg_may_share[i]] >= 0) |