xref: /csrg-svn/old/dbx/tests/cc/own.c (revision 44085)
1*44085Sbostic /*
2*44085Sbostic  * Test of static variables.
3*44085Sbostic  */
4*44085Sbostic 
5*44085Sbostic static int ownx;
6*44085Sbostic 
main()7*44085Sbostic main()
8*44085Sbostic {
9*44085Sbostic     ownx = 2;
10*44085Sbostic     f(3);
11*44085Sbostic     f(4);
12*44085Sbostic     return(0);
13*44085Sbostic }
14*44085Sbostic 
15*44085Sbostic static int owny;
16*44085Sbostic 
f(x)17*44085Sbostic f(x)
18*44085Sbostic int x;
19*44085Sbostic {
20*44085Sbostic     static int ownx;
21*44085Sbostic 
22*44085Sbostic     ownx = x;
23*44085Sbostic }
24