1 /* { dg-require-effective-target alloca } */
3 typedef __SIZE_TYPE__
size_t;
5 int test_alloca_1 (void)
7 void *buf
= __builtin_alloca (1024);
8 return test_alloca_1 (); /* { dg-warning "-Wanalyzer-infinite-recursion" } */
11 int test_alloca_2 (size_t n
)
13 void *buf
= __builtin_alloca (n
);
14 return test_alloca_2 (n
); /* { dg-warning "-Wanalyzer-infinite-recursion" } */
17 int test_alloca_3 (size_t n
)
19 void *buf
= __builtin_alloca (n
);
20 return test_alloca_2 (n
- 1);
23 int test_alloca_4 (size_t n
)
25 void *buf
= __builtin_alloca (n
);
27 return test_alloca_2 (n
- 1);