struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / qct / 0057-duff.c
blob6b9aae1e16e1fea69fe1b35548c0b77bac12da06
2 int main()
4 int count, n;
5 char *from, *to;
6 char a[39], b[39];
8 for(n = 0; n < 39; n++) {
9 a[n] = n;
10 b[n] = 0;
12 from = a;
13 to = b;
14 count = 39;
15 n = (count + 7) / 8;
16 switch (count % 8) {
17 case 0: do { *to++ = *from++;
18 case 7: *to++ = *from++;
19 case 6: *to++ = *from++;
20 case 5: *to++ = *from++;
21 case 4: *to++ = *from++;
22 case 3: *to++ = *from++;
23 case 2: *to++ = *from++;
24 case 1: *to++ = *from++;
25 } while (--n > 0);
27 for(n = 0; n < 39; n++)
28 if(a[n] != b[n])
29 return 1;
30 return 0;