Skip several analyzer socket tests on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / infinite-recursion-alloca.c
blob87727e8ca25b60f2fd1c0f2890105d09b8bd33f7
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);
26 if (n > 0)
27 return test_alloca_2 (n - 1);
28 return 42;