[Bug c/83172] -Wstack-size= doesn't detect the correct stack size with VLA or alloca

2017-11-27 Thread hao.hou at utah dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83172 --- Comment #4 from Hao Hou --- (In reply to Eric Botcazou from comment #3) > > 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 m

[Bug c/83172] -Wstack-size= doesn't detect the correct stack size with VLA or alloca

2017-11-27 Thread hao.hou at utah dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83172 --- Comment #2 from Hao Hou --- (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 func

[Bug c/83174] New: -Wvla-larger-than reports wrong VLA size in some cases

2017-11-26 Thread hao.hou at utah dot edu
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: hao.hou at utah dot edu Target Milestone: --- Created attachment 42725 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42725&action=edit The preprocessed source code repoduce the bug There's some case

[Bug c/83172] New: -Wstack-size= doesn't detect the correct stack size with VLA or alloca

2017-11-26 Thread hao.hou at utah dot edu
ormal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: hao.hou at utah dot edu Target Milestone: --- Created attachment 42723 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42723&action=edit The preprocessed source c