aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-array-bounds.cc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-05-31 20:30:10 +0100
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:09:29 -0300
commit1362412c7ca6bcdc7a9f4b53d2e18d931e0cb4e7 (patch)
tree6c697cd1dc2fe88bb959af4dce1f4bd8f352aed9 /gcc/gimple-array-bounds.cc
parent4bfdfedc3c143a07ba2d4789b1a16ba1d7e8ca0b (diff)
downloadgcc-1362412c7ca6bcdc7a9f4b53d2e18d931e0cb4e7.zip
gcc-1362412c7ca6bcdc7a9f4b53d2e18d931e0cb4e7.tar.gz
gcc-1362412c7ca6bcdc7a9f4b53d2e18d931e0cb4e7.tar.bz2
coroutines: Avoid functions with unlowered coroutine trees [PR95087].
Diagnosing bad uses of 'return' in coroutines is somewhat tricky, since the user can use the keyword before we know that the function is a coroutine (where such returns are not permitted). At present, we are just doing a check for any use of 'return' and erroring on that. However, we can't then pass the function body on, since it will contain unlowered coroutine trees. This avoids the issue by dropping the entire function body under that circumstance. We could do better (for 11) but this is intended to allow back-port of other fixes to 10. gcc/cp/ChangeLog: PR c++/95087 * coroutines.cc (morph_fn_to_coro): If we see an early fatal error, drop the erroneous function body. gcc/testsuite/ChangeLog: PR c++/95087 * g++.dg/coroutines/co-return-syntax-08-bad-return.C: Adjust the testcase to do the compile (rather than an -fsyntax-only parse).
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions