Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20021113-1.c

raw
1 /* This program tests a data flow bug that would cause constant propagation
2 to propagate constants through function calls. */
3
4 void abort (void);
5 void exit (int);
6
7 void
8 foo (int *p)
9 {
10 *p = 10;
11 }
12
13 int
14 main(void)
15 {
16 int *ptr = __builtin_alloca (sizeof (int));
17 *ptr = 5;
18 foo (ptr);
19 if (*ptr == 5)
20 abort ();
21 exit (0);
22 }