4 int f(int *a
, int b
, int **c
)
15 /*@-shadow@*/ int *lx
; /*@=shadow@*/
17 *lx
= 3; /* 1. use before def */
20 *lx
= 4; /* 2. modifies a */
22 x
= y
; /* x aliases *c */
28 x
= a
; /* okay - x alias a */
29 *x
= 3; /* 3. modifies *a */
34 *x
= 3; /* 4. modifies **c */
38 *x
= 4; /* 5, 6. bad - may modify *a or **c */
41 if ((**c
= b
) == 3) /* 7. modifies **c */
43 *y
= 3; /* 8, 9. may modify glob and *globp */
44 globp
= a
; /* 10. modifies globp */
53 *a
= 3; /* 11, 12. modifies glob, *globp through y and z */
54 *z
= 6; /* 13, 14. modifies *a, *globp */
55 *globp
= 5; /* 15, 16. modifies *globp, *a */
56 return 3; /* 17. leaves globp aliasing a */