1 /* Test globals used and unused within different parts of a program */
3 /* FIXME: This testcase should be automated */
7 extern void exit_dummy(int*);
13 foo(int *Z) /* accesses globals printf and format string, and */
14 { /* N = alloca(int) from test() */
15 if (Z == 0) exit_dummy(Z); /* call to external function */
17 printf("N = %d\n", *Z);
22 if (Y == 0) exit_dummy(Y); /* second call to external function */
26 test(int* X) /* accesses global G */
27 { /* allocates G = malloc(int*) and N = alloca(int) */
30 G = (int**) alloca(sizeof(int*));
40 main() /* only accesses global N */