Mercurial > hg > CbC > old > device
diff test/bitfield1.c @ 558:528fed826f17 partial-evaluation
const value switch statement prune.
author | kono |
---|---|
date | Sat, 07 Jan 2006 12:46:38 +0900 |
parents | ef225b589888 |
children | 9598ecec0af5 |
line wrap: on
line diff
--- a/test/bitfield1.c Sat Jan 07 02:00:06 2006 +0900 +++ b/test/bitfield1.c Sat Jan 07 12:46:38 2006 +0900 @@ -81,103 +81,103 @@ main1() { int i; - printf("#0079:%d\n",a.i); + printf("#0083:%d\n",a.i); ll1.b.v = -1; - printf("#0082:01:%llx\n",ll1.b.v); - printf("#0083:02:"); for(i=0;i<32;i++) printf("#0082:%02x",ll1.a[i]); printf("#0082:\n"); + printf("#0086:01:%llx\n",ll1.b.v); + printf("#0087:02:"); for(i=0;i<32;i++) printf("#0082:%02x",ll1.a[i]); printf("#0082:\n"); ll1.b.v = 0; ll1.b.w = -1; - printf("#0086:02:"); for(i=0;i<32;i++) printf("#0085:%02x",ll1.a[i]); printf("#0085:\n"); + printf("#0090:02:"); for(i=0;i<32;i++) printf("#0085:%02x",ll1.a[i]); printf("#0085:\n"); ll1.b.w = 0; ll1.b.x = -1; - printf("#0089:02:"); for(i=0;i<32;i++) printf("#0088:%02x",ll1.a[i]); printf("#0088:\n"); + printf("#0093:02:"); for(i=0;i<32;i++) printf("#0088:%02x",ll1.a[i]); printf("#0088:\n"); ll0.b.v = -1; - printf("#0092:01:%llx\n",ll0.b.v); - printf("#0093:02:"); for(i=0;i<32;i++) printf("#0092:%02x",ll0.a[i]); printf("#0092:\n"); + printf("#0096:01:%llx\n",ll0.b.v); + printf("#0097:02:"); for(i=0;i<32;i++) printf("#0092:%02x",ll0.a[i]); printf("#0092:\n"); ll0.b.v = 0; ll0.b.w = -1; - printf("#0096:02:"); for(i=0;i<32;i++) printf("#0095:%02x",ll0.a[i]); printf("#0095:\n"); + printf("#0100:02:"); for(i=0;i<32;i++) printf("#0095:%02x",ll0.a[i]); printf("#0095:\n"); ll0.b.w = 0; ll0.b.x = -1; - printf("#0099:02:"); for(i=0;i<32;i++) printf("#0098:%02x",ll0.a[i]); printf("#0098:\n"); + printf("#0103:02:"); for(i=0;i<32;i++) printf("#0098:%02x",ll0.a[i]); printf("#0098:\n"); ll.b.v = -1; - printf("#0102:1:%llx\n",ll.b.v); - printf("#0103:02:"); for(i=0;i<32;i++) printf("#0102:%02x",ll.a[i]); printf("#0102:\n"); + printf("#0106:1:%llx\n",ll.b.v); + printf("#0107:02:"); for(i=0;i<32;i++) printf("#0102:%02x",ll.a[i]); printf("#0102:\n"); ll.b.v = 0; ll.b.w = -1; - printf("#0106:02:"); for(i=0;i<32;i++) printf("#0105:%02x",ll.a[i]); printf("#0105:\n"); + printf("#0110:02:"); for(i=0;i<32;i++) printf("#0105:%02x",ll.a[i]); printf("#0105:\n"); ll.b.w = 0; ll.b.x = -1; - printf("#0109:02:"); for(i=0;i<32;i++) printf("#0108:%02x",ll.a[i]); printf("#0108:\n"); + printf("#0113:02:"); for(i=0;i<32;i++) printf("#0108:%02x",ll.a[i]); printf("#0108:\n"); - printf("#0111:char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n"); + printf("#0115:char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n"); cc.b.a = -1; - printf("#0113:a:%08x\n",cc.a); + printf("#0117:a:%08x\n",cc.a); cc.b.b = -1; - printf("#0115:b:%08x\n",cc.a); + printf("#0119:b:%08x\n",cc.a); cc.b.c = -1; - printf("#0117:c:%08x\n",cc.a); + printf("#0121:c:%08x\n",cc.a); cc.b.d = -1; - printf("#0119:d:%08x\n",cc.a); + printf("#0123:d:%08x\n",cc.a); cc.b.e = -1; - printf("#0121:e:%08x\n",cc.a); + printf("#0125:e:%08x\n",cc.a); cc.b.f = -1; - printf("#0123:f:%08x\n",cc.a); - printf("#0124:3:%d %d\n",cc.b.c,cc.b.d); + printf("#0127:f:%08x\n",cc.a); + printf("#0128:3:%d %d\n",cc.b.c,cc.b.d); cc.a = -1; - printf("#0126:f:%08x\n",cc.a); + printf("#0130:f:%08x\n",cc.a); cc.b.a = 0; - printf("#0128:a:%08x\n",cc.a); + printf("#0132:a:%08x\n",cc.a); cc.b.b = 0; - printf("#0130:b:%08x\n",cc.a); + printf("#0134:b:%08x\n",cc.a); cc.b.c = 0; - printf("#0132:c:%08x\n",cc.a); + printf("#0136:c:%08x\n",cc.a); cc.b.d = 0; - printf("#0134:d:%08x\n",cc.a); + printf("#0138:d:%08x\n",cc.a); cc.b.e = 0; - printf("#0136:e:%08x\n",cc.a); + printf("#0140:e:%08x\n",cc.a); cc.b.f = 0; - printf("#0138:f:%08x\n",cc.a); - printf("#0139:3:%d %d\n",cc.b.c,cc.b.d); + printf("#0142:f:%08x\n",cc.a); + printf("#0143:3:%d %d\n",cc.b.c,cc.b.d); cc.a = 0; - printf("#0141:f:%08x\n",cc.a); + printf("#0145:f:%08x\n",cc.a); cc.b.a = 1; - printf("#0143:a:%08x\n",cc.a); + printf("#0147:a:%08x\n",cc.a); cc.b.b = 1; - printf("#0145:b:%08x\n",cc.a); + printf("#0149:b:%08x\n",cc.a); cc.b.c = 1; - printf("#0147:c:%08x\n",cc.a); + printf("#0151:c:%08x\n",cc.a); cc.b.d = 1; - printf("#0149:d:%08x\n",cc.a); + printf("#0153:d:%08x\n",cc.a); cc.b.e = 1; - printf("#0151:e:%08x\n",cc.a); + printf("#0155:e:%08x\n",cc.a); cc.b.f = 1; - printf("#0153:f:%08x\n",cc.a); - printf("#0154:3:%d %d\n",cc.b.c,cc.b.d); + printf("#0157:f:%08x\n",cc.a); + printf("#0158:3:%d %d\n",cc.b.c,cc.b.d); cc.a = -1; - printf("#0156:f:%08x\n",cc.a); + printf("#0160:f:%08x\n",cc.a); cc.b.a = 1; - printf("#0158:a:%08x\n",cc.a); + printf("#0162:a:%08x\n",cc.a); cc.b.b = 1; - printf("#0160:b:%08x\n",cc.a); + printf("#0164:b:%08x\n",cc.a); cc.b.c = 1; - printf("#0162:c:%08x\n",cc.a); + printf("#0166:c:%08x\n",cc.a); cc.b.d = 1; - printf("#0164:d:%08x\n",cc.a); + printf("#0168:d:%08x\n",cc.a); cc.b.e = 1; - printf("#0166:e:%08x\n",cc.a); + printf("#0170:e:%08x\n",cc.a); cc.b.f = 1; - printf("#0168:f:%08x\n",cc.a); - printf("#0169:3:%d %d\n",cc.b.c,cc.b.d); + printf("#0172:f:%08x\n",cc.a); + printf("#0173:3:%d %d\n",cc.b.c,cc.b.d); ii.b.a = -1; - printf("#0172:6:%08x\n",ii.a); + printf("#0176:6:%08x\n",ii.a); ii.b.d = -1; - printf("#0174:6:%08x\n",ii.a); - printf("#0175:5:%d %d\n",ii.b.a,ii.b.d); + printf("#0178:6:%08x\n",ii.a); + printf("#0179:5:%d %d\n",ii.b.a,ii.b.d); main5(); return 0; @@ -189,13 +189,13 @@ int i,j,bit=1; for(i=0;i<32;i++,bit<<=1) { ii.a = bit; - printf("#0187:%08x:ii.b.a=%d ii.b.b=%d ii.b.c=%d ii.b.d=%d ii.b.e=%d ii.b.f=%d\n",bit, + printf("#0191:%08x:ii.b.a=%d ii.b.b=%d ii.b.c=%d ii.b.d=%d ii.b.e=%d ii.b.f=%d\n",bit, ii.b.a,ii.b.b,ii.b.c,ii.b.d,ii.b.e,ii.b.f); } bit=1; for(i=0;i<32;i++,bit<<=1) { cc.a = bit; - printf("#0193:%08x:cc.b.a=%d cc.b.b=%d cc.b.c=%d cc.b.d=%d cc.b.e=%d cc.b.f=%d\n",bit, + printf("#0197:%08x:cc.b.a=%d cc.b.b=%d cc.b.c=%d cc.b.d=%d cc.b.e=%d cc.b.f=%d\n",bit, cc.b.a,cc.b.b,cc.b.c,cc.b.d,cc.b.e,cc.b.f); } ll.a[0]=ll.a[1]=ll.a[2]=ll.a[3]= ll.a[4]=ll.a[5]=ll.a[6]=ll.a[7]=0; @@ -204,11 +204,11 @@ bit=1; for(j=0;j<32;j++,bit<<=1) { ll.a[i] = bit; - printf("#0202:02:%02x %02x %02x %02x %02x %02x %02x %02x\n", + printf("#0206:02:%02x %02x %02x %02x %02x %02x %02x %02x\n", ll.a[0],ll.a[1],ll.a[2],ll.a[3], ll.a[4],ll.a[5],ll.a[6],ll.a[7] ); - printf("#0206: ll.b.v=%lld ll.b.w=%lld ll.b.x=%lld\n",ll.b.v,ll.b.w,ll.b.x); + printf("#0210: ll.b.v=%lld ll.b.w=%lld ll.b.x=%lld\n",ll.b.v,ll.b.w,ll.b.x); } ll.a[i]=0; }