gcc/testsuite/gcc.dg/Wframe-larger-than.c
raw| 1 | /* Test -Wframe-larger-than for warning |
| 2 | when the frame size is bigger than specified. |
| 3 | Origin: Seongbae Park <[email protected]> */ |
| 4 | |
| 5 | /* { dg-do compile } */ |
| 6 | /* { dg-options "-Wframe-larger-than=2048" } */ |
| 7 | /* { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */ |
| 8 | |
| 9 | extern void func(char *); |
| 10 | |
| 11 | void foo (void) { |
| 12 | char array[4096]; |
| 13 | func(array); |
| 14 | } /* { dg-warning "the frame size of .* bytes is larger than 2048 bytes" } */ |