aboutsummaryrefslogtreecommitdiff
path: root/include/gdb/gdb-index.h
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@aarsen.me>2024-07-18 18:16:49 +0200
committerArsen Arsenović <arsen@gcc.gnu.org>2024-07-25 16:44:37 +0200
commit1a37d6b732506f8c3f9e9452c9dc6a456f25397b (patch)
tree8ef43f4056f2fae30d2ec70718ec80f71403b875 /include/gdb/gdb-index.h
parent2dd45655db47362153756261881413b368582597 (diff)
downloadgcc-1a37d6b732506f8c3f9e9452c9dc6a456f25397b.zip
gcc-1a37d6b732506f8c3f9e9452c9dc6a456f25397b.tar.gz
gcc-1a37d6b732506f8c3f9e9452c9dc6a456f25397b.tar.bz2
cp/coroutines: do not rewrite parameters in unevaluated contexts
It is possible to use parameters of a parent function of a lambda in unevaluated contexts without capturing them. By not capturing them, we work around the usual mechanism we use to prevent rewriting captured parameters. Prevent this by simply skipping rewrites in unevaluated contexts. Those won't mind the value not being present anyway. This prevents an ICE during parameter substitution. In the testcase from the PR, the rewriting machinery finds a param in the body of the coroutine, which it did not previously encounter while processing the coroutine declaration, and that does not have a DECL_VALUE_EXPR, and fails. gcc/cp/ChangeLog: PR c++/111728 * coroutines.cc (rewrite_param_uses): Skip unevaluated subexpressions. gcc/testsuite/ChangeLog: PR c++/111728 * g++.dg/coroutines/pr111728.C: New test.
Diffstat (limited to 'include/gdb/gdb-index.h')
0 files changed, 0 insertions, 0 deletions