aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.cc
diff options
context:
space:
mode:
authorRoger Sayle <roger@nextmovesoftware.com>2022-03-10 23:49:15 +0000
committerRoger Sayle <roger@nextmovesoftware.com>2022-03-10 23:49:15 +0000
commita717376e99fb33ba3b06bd8122e884f4b63a60c9 (patch)
tree95bbd10442a8c9cba05703eff2c8248714db7f4f /gcc/calls.cc
parenta8db9b90439f33af9ef602325df1f1e967fc549a (diff)
downloadgcc-a717376e99fb33ba3b06bd8122e884f4b63a60c9.zip
gcc-a717376e99fb33ba3b06bd8122e884f4b63a60c9.tar.gz
gcc-a717376e99fb33ba3b06bd8122e884f4b63a60c9.tar.bz2
PR c++/84964: Middle-end patch to expand_call for ICE after sorry.
This patch resolves PR c++/84969 which is an ICE in the middle-end after emitting a "sorry, unimplemented" message, and is a regression from earlier releases of GCC. This issue is that after encountering a function call requiring an unreasonable amount of stack space, the code continues and falls foul of an assert checking that stack pointer has been correctly updated. The fix is to (locally) consider aborted function calls as "no return", which skips this downstream sanity check. 2022-03-10 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR c++/84964 * calls.cc (expand_call): Ignore stack adjustments after sorry. gcc/testsuite/ChangeLog PR c++/84964 * g++.dg/other/pr84964.C: New test case.
Diffstat (limited to 'gcc/calls.cc')
-rw-r--r--gcc/calls.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/calls.cc b/gcc/calls.cc
index 58864d0..50fa7b8 100644
--- a/gcc/calls.cc
+++ b/gcc/calls.cc
@@ -3447,6 +3447,8 @@ expand_call (tree exp, rtx target, int ignore)
>= (1 << (HOST_BITS_PER_INT - 2)))
{
sorry ("passing too large argument on stack");
+ /* Don't worry about stack clean-up. */
+ flags |= ECF_NORETURN;
continue;
}