-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VLA in coroutine produces internal clang segfault #65858
Comments
on clang trunk it produces 'backend error' with code 70 and still with dump, okay its obviously implementation limitation now P.S. it must be ill formed only in case when it's required to store VLA between awaits, in this case there are no logical problem to use VLA |
CC @ChuanqiXu9 |
@llvm/issue-subscribers-clang-frontend |
@llvm/issue-subscribers-coroutines |
in // [stmt.return.coroutine]p1:
// A coroutine shall not enclose a return statement ([stmt.return]).
if (Fn->FirstReturnLoc.isValid()) {
assert(Fn->FirstCoroutineStmtLoc.isValid() &&
"first coroutine location not set");
Diag(Fn->FirstReturnLoc, diag::err_return_in_coroutine);
Diag(Fn->FirstCoroutineStmtLoc, diag::note_declared_coroutine_here)
<< Fn->getFirstCoroutineStmtKeyword();
} Doing the same thing for VLAS would resolve the crash. in |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
For more instructions on how to submit a patch to LLVM, see our documentation. If you have any further questions about this issue, don't hesitate to ask via a comment on this Github issue. @llvm/issue-subscribers-good-first-issue |
Assign to myself to add this to my TODO list. Feel free to take this if any one is interested. |
Its obviously must be ill-formed to create VLA in corotuine, because itis not possible to determine frame size for such coro
https://godbolt.org/z/WoE94a4sf
compiler output
The text was updated successfully, but these errors were encountered: