https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Richard Biener from comment #7) > In theory, if somebody really wanted it, we could replace alloca with > __builtin_stack_save/restore during inlining (not sure if it would > simply work, and be efficient, by just putting save at the start of the > function and restore at the end). Not replace, just emit __builtin_stack_save/restore around any inlined function which calls alloca. That looks like a good idea to me. I'll have a look, perhaps we should do it for now just without further changes, but in the future might also reconsider making functions which call alloca non-inlinable.