diff options
| author | David Mertens <dcmertens.perl@gmail.com> | 2016-11-22 16:33:12 -0500 |
|---|---|---|
| committer | David Mertens <dcmertens.perl@gmail.com> | 2016-11-28 09:01:12 -0500 |
| commit | d2e2f423820ca00c1f1d56fadd744a7e1d345955 (patch) | |
| tree | 471d4ae451a52e315fb967e3c061df30a46552e6 /tests | |
| parent | 3c68a8c6c04e1a527e2d80f2586cb2df96f862c6 (diff) | |
| download | tinycc-d2e2f423820ca00c1f1d56fadd744a7e1d345955.tar.gz tinycc-d2e2f423820ca00c1f1d56fadd744a7e1d345955.tar.bz2 | |
Implement gcc bitfield algorithm; add -mms-bitfields
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tcctest.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c index 5851fb4..b0fe8f3 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -1634,6 +1634,15 @@ void bitfield_test(void) st2.f3 = a; st2.f2++; printf("%lld %lld %lld\n", st2.f1, st2.f2, st2.f3); + struct sbf3 { + int f1 : 7; + int f2 : 1; + char f3; + int f4 : 8; + int f5 : 1; + int f6 : 16; + } st3; + printf("sizeof(st3) = %d\n", sizeof(st3)); } #ifdef __x86_64__ |
