Mercurial > hg > CbC > old > device
diff test/tmp7.c @ 427:0c256ea2a97e
Bitfield left value for ia32
author | kono |
---|---|
date | Sat, 30 Oct 2004 18:49:25 +0900 |
parents | 22949117768f |
children | 32737bad7489 |
line wrap: on
line diff
--- a/test/tmp7.c Sat Oct 30 14:04:45 2004 +0900 +++ b/test/tmp7.c Sat Oct 30 18:49:25 2004 +0900 @@ -35,17 +35,17 @@ /* main2 a1.a[55] 0 */ /* main2 a1.a[99] 55 */ /* main2 a1.a[55] 44 */ - printf("main2 a1.a[99] %d\n",a1.a[99]); - printf("main2 a1.a[55] %d\n",a1.a[55]); + printf("#0037:main2 a1.a[99] %d\n",a1.a[99]); + printf("#0038:main2 a1.a[55] %d\n",a1.a[55]); } struct bb main5(struct aa a1,struct bb a2) { - printf("main5 a1.a[99] %d\n",a1.a[99]); - printf("main5 a1.a[55] %d\n",a1.a[55]); - printf("main5 a2.b[0] %d\n",a2.b[0]); - printf("main5 a2.b[1] %d\n",a2.b[1]); + printf("#0044:main5 a1.a[99] %d\n",a1.a[99]); + printf("#0045:main5 a1.a[55] %d\n",a1.a[55]); + printf("#0046:main5 a2.b[0] %d\n",a2.b[0]); + printf("#0047:main5 a2.b[1] %d\n",a2.b[1]); a2.b[0]=333; a2.b[1]=555; return a2; @@ -57,7 +57,7 @@ { /* main1 a1.a[0] 0 */ /* main1 a1.a[0] 44 */ - printf("main1 a1.a[0] %d\n",a1.a[0]); + printf("#0059:main1 a1.a[0] %d\n",a1.a[0]); a1.a[55]=44; if (a1.a[0]) main2(a1); @@ -79,48 +79,48 @@ j = 3; bbb = main0(123); - printf("copied main0 ccc.a[55] %d==123\n",bbb.a[55]); + printf("#0081:copied main0 ccc.a[55] %d==123\n",bbb.a[55]); aap[2] = &bbb; *aap[2] = main0(123); - printf("complex copied main0 ccc.a[55] %d==123\n",bbb.a[55]); + printf("#0084:complex copied main0 ccc.a[55] %d==123\n",bbb.a[55]); bbb.a[55]=0; j = main0(123).a[55]; - printf("new main0 ccc.a[55] in temporal copy %d==123\n",j); + printf("#0087:new main0 ccc.a[55] in temporal copy %d==123\n",j); j = 552; bbb = main3(bbb); - printf("main3 bbb.a[55] in temporal copy %d==552 %d==1\n",j,bbb.a[55]); + printf("#0091:main3 bbb.a[55] in temporal copy %d==552 %d==1\n",j,bbb.a[55]); j = main3(bbb).a[55]; - printf("main3 bbb.a[55] in temporal copy %d==2 %d\n",j,bbb.a[53]); + printf("#0093:main3 bbb.a[55] in temporal copy %d==2 %d\n",j,bbb.a[53]); j = main3(bbb).a[53]; - printf("main3 bbb.a[55] in temporal copy %d==53 %d\n",j,bbb.a[53]); + printf("#0095:main3 bbb.a[55] in temporal copy %d==53 %d\n",j,bbb.a[53]); - printf("%d==3\n",q.b); + printf("#0097:%d==3\n",q.b); /* 3==3 */ r = q; - printf("%d==3\n",r.b); + printf("#0100:%d==3\n",r.b); /* 3==3 */ (*r.c)(aaa); - printf("main aaa.a[55] %d\n",aaa.a[55]); + printf("#0103:main aaa.a[55] %d\n",aaa.a[55]); /* main aaa.a[55] 123 */ bbb.a[0]=44; aaa = bbb; aaa.a[99]=55; /* core dump? */ (*r.c)(aaa); /* main aaa.a[55] 0 */ - printf("main aaa.a[55] %d\n",aaa.a[55]); + printf("#0110:main aaa.a[55] %d\n",aaa.a[55]); p = av[0]; if (!p) return; i = p[1]; p = p+i; /* 47 ./a.out */ - printf("%d %s\n",i,p-i+3); + printf("#0116:%d %s\n",i,p-i+3); aaa1.b[0]=33; aaa1.b[1]=55; bbb1 = main5(aaa,aaa1); - printf("main5-2 %d\n", + printf("#0120:main5-2 %d\n", main5(bbb,bbb1).b[0]); - printf("main5-1 %d\n", + printf("#0122:main5-1 %d\n", main5(bbb,main5(aaa,aaa1)).b[0]); return 0; }