xref: /csrg-svn/old/dbx/tests/cc/reg.c (revision 44087)
1*44087Sbostic struct blah {
2*44087Sbostic     int x;
3*44087Sbostic     int y;
4*44087Sbostic };
5*44087Sbostic 
main()6*44087Sbostic main ()
7*44087Sbostic {
8*44087Sbostic     register int i;
9*44087Sbostic     register struct blah *p;
10*44087Sbostic     register char *s;
11*44087Sbostic     struct blah b;
12*44087Sbostic     int j;
13*44087Sbostic 
14*44087Sbostic     s = "this is a test";
15*44087Sbostic     s += 5;
16*44087Sbostic     j = 0;
17*44087Sbostic     p = &b;
18*44087Sbostic     p->x = 3;
19*44087Sbostic     p->y = 4;
20*44087Sbostic     for (i = 0; i < 2; i++) {
21*44087Sbostic 	j = i;
22*44087Sbostic 	put(i);
23*44087Sbostic     }
24*44087Sbostic }
25*44087Sbostic 
put(i)26*44087Sbostic static put(i)
27*44087Sbostic register int i;
28*44087Sbostic {
29*44087Sbostic     printf("%d ", i);
30*44087Sbostic }
31