Debian Codegraph @

gcc/testsuite/gcc.dg/Walloca-15.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-Walloca-larger-than=128 -O2" } */
3
4 typedef __SIZE_TYPE__ size_t;
5
6 void bar (void*);
7
8 void foo1 (size_t len)
9 {
10 bar (__builtin_alloca_with_align_and_max (len, 8, 128));
11 }
12
13 void foo2 (size_t len)
14 {
15 bar (__builtin_alloca_with_align_and_max (len, 8, 256)); /* { dg-warning "may be too large" } */
16 }