/* StdCCorpse4.c */ typedef struct label_t { int val[14]; } label_t; int Proc1(n) int n; { label_t l; register sum = 0; int i; l.val[0] = l.val[1] = 1; for (i=2; i<14; i++) l.val[i] = l.val[i-1] + l.val[i-2]; for (i=0; ii = *f2->i + 6; return *f2->i; } struct foo_bar {int a, b;}; int update_1(x, index, y) int x; register int index; int y; { int ix; static int iy = 1; int results = 4; float other; char none[20]; struct foo2_1 bletch; typedef struct barf {int c, d;} barf; barf b; other = 4.5; ix = 12; iy = 31; other = 3.141592653; none[0] = 'A'; none[1] = 'B'; none[2] = 'C'; none[3] = 'D'; none[4] = '\0'; bletch.i = &results; bletch.f = &other; bletch.c = none; iy = depth_1_1(&bletch); for (ix=0; ix<10; ++ix) results += (ix + index); return(results); } /* Test Case 2 */ struct foo2 { int* i; float* f; char* c; }; struct foo1 { struct foo2* f2; int i2; }; struct foo2 a_foo2 = {&an_int, &a_float, a_str}; struct foo2 *p_foo2 = &a_foo2; struct foo1 a_foo1 = {&a_foo2, 47}; struct foo1 *p_foo1 = &a_foo1; int depth_3 (f2, f1, ch, i, pch, pi) struct foo2 f2; struct foo1* f1; char ch; int i; char* pch; int* pi; { *f1->f2->i = *f1->f2->i + 23; *f2.i = *f2.i + 8; *f2.f = *f2.f + 3.2; return *f2.i; } int depth_2 (f2, f1, ch, i, pch, pi) struct foo2 f2; struct foo1* f1; char ch; int i; char* pch; int* pi; { *f2.i = *f2.i + 7; depth_3(f2, f1, ch, i, pch, pi); return *f2.i; } int depth_1 (f2, f1, ch, i, pch, pi) struct foo2 f2; struct foo1* f1; char ch; int i; char* pch; int* pi; { *f2.i = *f2.i + 6; depth_2(f2, f1, ch, i, pch, pi); return *f2.i; } int tinycall(ix) int ix; { ix = ix + 23; return ix - 5; } int update(index) int index; { int ix, iy, results = 4; float other; char none[20]; struct foo2 bletch; struct foo1 blortch; other = 4.5; ix = 12; iy = 31; other = 3.141592653; none[0] = 'A'; none[1] = 'B'; none[2] = 'C'; none[3] = 'D'; none[4] = '\0'; bletch.i = &results; bletch.f = &other; bletch.c = none; blortch.f2 = &bletch; blortch.i2 = iy; tinycall(4); iy = depth_1(bletch, &blortch, none[0], ix, none, &results); for (ix=0; ix<10; ++ix) results += (ix + index); return(results); } /* update */