diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-14 20:54:00 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-07-14 20:54:00 +0000 |
commit | 8905b945e796285f1d4b5a17c8073054b38ca05b (patch) | |
tree | 62ccd56b35e933003653d5a5b1bcc8d7d34eb5d0 /gcc/lra-constraints.c | |
parent | 98044b92eea77974a5c557d3582098a2fc9f32a7 (diff) | |
download | gcc-8905b945e796285f1d4b5a17c8073054b38ca05b.tar.gz |
2015-07-14 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/66626
* lra-constraints.c (lra_constraints): Prevent equivalence
substitution for static chain pseudo in functions with nonlocal
goto.
2015-07-14 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/66626
* gcc.target/i386/pr66626.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index ddb91dd49cf..58a388fa9e8 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -4306,7 +4306,13 @@ lra_constraints (bool first_p) && ((CONST_POOL_OK_P (PSEUDO_REGNO_MODE (i), x) && (targetm.preferred_reload_class (x, lra_get_allocno_class (i)) == NO_REGS)) - || contains_symbol_ref_p (x)))) + || contains_symbol_ref_p (x))) + /* Static chain equivalence may contain eliminable + regs and the result of elimination might be wrong + after restoring frame pointer for a nonlocal + goto. */ + || (cfun->static_chain_decl && crtl->has_nonlocal_goto + && REG_EXPR (reg) == cfun->static_chain_decl)) ira_reg_equiv[i].defined_p = false; if (contains_reg_p (x, false, true)) ira_reg_equiv[i].profitable_p = false; |