1 /* Exercise -Wframe-larger-than= with a byte-size suffix.
2 { dg-do compile }
3 { dg-options "-O -Wframe-larger-than=1KB" }
4 { dg-skip-if "exceeds eBPF stack limit" { bpf-*-* } } */
5
6 extern void f (void*, ...);
7
frame_size_912(void)8 void frame_size_912 (void)
9 {
10 char a[512];
11 char b[400];
12 f (a, b);
13 }
14
frame_size_1025(void)15 void frame_size_1025 (void)
16 {
17 char a[512];
18 char b[513];
19 f (a, b);
20 } /* { dg-warning "frame size of \[0-9\]+ bytes is larger than 1024 bytes" } */
21