X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Ftest%2Fbitfield.c;h=8900028270c76400b9a1fab09858d1c74f97b93c;hb=96804edc5e3a2da35375152ba70edeae64a6df4e;hp=93d1d891103356bc77fdb71d84d4ab1c5800bb5d;hpb=55b8f4e437d28de3ac1c13e6d677fd1a92973a6d;p=libfirm diff --git a/ir/be/test/bitfield.c b/ir/be/test/bitfield.c index 93d1d8911..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);