https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99122
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- That could perhaps work for the #c0 testcase where the function actually has a non-VL parameter and so garbage in garbage out. But would that work also for #c2? If one dumps the #c2 testcase with -O2 -fno-inline -fdump-tree-optimized, the PARM_DECL is clearly variable length but not lowered to *ptr, while in the caller it is lowered that way and allocated through __builtin_alloca_with_align. So, clearly PARM_DECLs can be variable length but VAR_DECLs should not be (they should be gimplified into ptr = __builtin_alloca_with_align with stack save/restore around the scope and DECL_VALUE_EXPR of *ptr. The inliner certainly doesn't do that right now. For punting on inlining these, I couldn't find any spot that would try to verify at least remote compatibility of the passed in arguments and the arguments the callee expects.