[Bug c++/115858] Incompatibility of coroutines and alloca()
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 15 15:18:52 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115858
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Arsen Arsenović from comment #1)
> - clang: permits alloca in coroutines in many cases. by my crude testing,
> it seems to only fail if the size is dynamic and the use of the allocated
> region goes over a suspension point. this makes sense, but I'm unsure how
> involved of a change it is
So this makes sense for LLVM really since local variables are always `alloca'd`
on the stack and then optimized away. So the lowering pass for coroutines seems
to happen on LLVM bitcode rather than clang AST.
More information about the Gcc-bugs
mailing list