https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83172
--- Comment #2 from Hao Hou <hao.hou at utah dot edu> --- (In reply to Eric Botcazou from comment #1) > What happens for -Wvla-larger-than= if you use -O0 or -O1 instead of -O3? The same result: $ gcc-7 -Wvla-larger-than=128 -Wstack-usage=102400 -O0 -c t.c t.c: In function ‘stack_usage_only’: t.c:23:5: warning: stack usage might be unbounded [-Wstack-usage=] int stack_usage_only(unsigned x) ^~~~~~~~~~~~~~~~ t.c: In function ‘alloca_fails_even_with_const’: t.c:32:5: warning: stack usage might be unbounded [-Wstack-usage=] int alloca_fails_even_with_const() ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -O1 results the same.