X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Ftest%2Fbitfield.c;h=8900028270c76400b9a1fab09858d1c74f97b93c;hb=93da909d12b7bec51aa36ee5f05966c331f90fb9;hp=90fdc65b8203d52eae227eabe9e4917131be9f51;hpb=e4691fe2e5046a9b2ae912e23e92ddcdcd2bb6e9;p=libfirm diff --git a/ir/be/test/bitfield.c b/ir/be/test/bitfield.c index 90fdc65b8..890002827 100644 --- a/ir/be/test/bitfield.c +++ b/ir/be/test/bitfield.c @@ -1,14 +1,21 @@ +#include + +struct a { + unsigned int i:1; +}; + struct b { int x:20; int y:8; int z:10; }; -struct b B = { 1, 2, 3 }; -struct b C = { 1, 2, 3 }; +struct b B = { -1, 2, 3 }; +struct b C = { -1, 2, 3 }; -main() +int main() { + printf("sizeof(struct a) = %zu\n", sizeof(struct a)); printf("sizeof(B) = %d\n", sizeof(B)); printf("x = %d\n", B.x); @@ -18,5 +25,7 @@ main() B.y = C.z; if (C.z) - return 3; + return 0; + + return 42; }