PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20021113-1.c
blob8226d3a85662ba610b955dbc47a8539da9412f73
1 /* { dg-require-effective-target alloca } */
3 /* This program tests a data flow bug that would cause constant propagation
4 to propagate constants through function calls. */
6 foo (int *p)
8 *p = 10;
11 main()
13 int *ptr = alloca (sizeof (int));
14 *ptr = 5;
15 foo (ptr);
16 if (*ptr == 5)
17 abort ();
18 exit (0);