https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 57215 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57215&action=edit gcc14-pr113596.patch Untested patch to do that. The disadvantage of doing that is that it may penalize inline calls which just use VLAs, because calls_alloca covers even those functions. For simple: static inline __attribute__((always_inline)) void foo (int n) { char p[n]; bar (p, n); } the fab1 pass actually removes redundant pair of stack_save/stack_restore, but bet if it would be something like { call (); { char p[n]; bar (p, n); } call (); } then it wouldn't. Anyway, this isn't a regression, so I think it is stage1 material for GCC 15.