https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109395
--- Comment #2 from Jakub Łukasiewicz <dev at joren dot ga> --- (In reply to Andrew Pinski from comment #1) > This is by designed and is even documented: > https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Warning-Options.html#index- > Wvla-larger-than_003d > > -Wvla-larger-than=‘PTRDIFF_MAX’ is enabled by default but is typically only > effective when -ftree-vrp is active (default for -O2 and above). Passing `-ftree-vrp` doesn't activate it either