Debian Codegraph @

gcc/testsuite/gcc.dg/vla-24.c

raw
1 /* PR middle-end/65958 */
2
3 /* { dg-do run } */
4 /* { dg-options "-std=gnu99" } */
5
6 extern void abort (void);
7
8 int foo (int n)
9 {
10 char *p, *q;
11
12 if (1)
13 {
14 char i[n];
15 p = __builtin_alloca (8);
16 p[0] = 1;
17 }
18
19 q = __builtin_alloca (64);
20 __builtin_memset (q, 0, 64);
21
22 return !p[0];
23 }
24
25 int main (void)
26 {
27 if (foo (48) != 0)
28 abort ();
29
30 return 0;
31 }