From b5b9147d35ee509714c34d813c7723bf18bb7b7a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 11 May 2019 11:33:22 +0200 Subject: [PATCH] re PR c++/59813 (tail-call elimination didn't fire for left-shift of char to cout) PR c++/59813 * config/aarch64/aarch64.c (aarch64_expand_epilogue): Don't add EH_RETURN_STACKADJ_RTX to sp in sibcall epilogues. From-SVN: r271093 --- gcc/ChangeLog | 6 ++++++ gcc/config/aarch64/aarch64.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 09552a1c036..e4b0099552f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-05-11 Jakub Jelinek + + PR c++/59813 + * config/aarch64/aarch64.c (aarch64_expand_epilogue): Don't add + EH_RETURN_STACKADJ_RTX to sp in sibcall epilogues. + 2019-05-11 Uroš Bizjak * config/i386/i386.md (floatdi2_i387_with_xmm): diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index c3c88c80bbe..1f904671c69 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -5913,7 +5913,7 @@ aarch64_expand_epilogue (bool for_sibcall) } /* Stack adjustment for exception handler. */ - if (crtl->calls_eh_return) + if (crtl->calls_eh_return && !for_sibcall) { /* We need to unwind the stack by the offset computed by EH_RETURN_STACKADJ_RTX. We have already reset the CFA -- 2.30.2