aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-06-27 17:29:19 -0400
committerJason Merrill <jason@gcc.gnu.org>2019-06-27 17:29:19 -0400
commit7ffc7de55b058e78cbc46803b89b712849ea35b3 (patch)
tree45cdc9befe6ccde50d84263ddfe64923c8a031a9 /gcc/config.gcc
parent95bb6e7a56d17f5f8886815f85dff71d12964245 (diff)
downloadgcc-7ffc7de55b058e78cbc46803b89b712849ea35b3.zip
gcc-7ffc7de55b058e78cbc46803b89b712849ea35b3.tar.gz
gcc-7ffc7de55b058e78cbc46803b89b712849ea35b3.tar.bz2
PR c++/55442 - memory-hog with highly recursive constexpr.
This testcase in the PR is extremely recursive, and therefore uses a huge amount of memory on caching the results of individual calls. We no longer need to track all calls to catch infinite recursion, as we have other limits on maximum depth and operations count. So let's only cache a few calls at the top level: 8 seems to be a reasonable compromise. gcc/c-family/ * c.opt (fconstexpr-loop-limit): New. gcc/cp/ * constexpr.c (push_cx_call_context): Return depth. (cxx_eval_call_expression): Don't cache past constexpr_cache_depth. From-SVN: r272765
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions