X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Ftest%2Fbitfield.c;h=8900028270c76400b9a1fab09858d1c74f97b93c;hb=dd9c319a93406f9f34a33f8d8ab6ea3c0c5c4b88;hp=cb11bb0f18ef82c86f5bf73b987f03ac47558275;hpb=857cb493902e7d54651141fd600f980c383d5fe6;p=libfirm diff --git a/ir/be/test/bitfield.c b/ir/be/test/bitfield.c index cb11bb0f1..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 }; 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,7 +25,7 @@ int main() B.y = C.z; if (C.z) - return 3; + return 0; - return 0; + return 42; }