diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-09-01 07:08:02 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-09-01 07:08:02 +0000 |
commit | 1b8e228a2c5d8f63ffa28c1fcef68f64a0408900 (patch) | |
tree | af62ff7abe9b492c132b53b9215d401544530dd6 /test/regression/bitfields6.c | |
parent | e99d18c442c40a14e6eaea722cbc7ef0ca6dd26a (diff) | |
download | compcert-1b8e228a2c5d8f63ffa28c1fcef68f64a0408900.tar.gz compcert-1b8e228a2c5d8f63ffa28c1fcef68f64a0408900.zip |
Bugs with 1- empty bitfields, 2- anonymous bitfields, 3- result type of reading a small unsigned bitfield
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1496 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/regression/bitfields6.c')
-rw-r--r-- | test/regression/bitfields6.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/regression/bitfields6.c b/test/regression/bitfields6.c new file mode 100644 index 00000000..3c2dcbe5 --- /dev/null +++ b/test/regression/bitfields6.c @@ -0,0 +1,18 @@ +#include <stdio.h> + +struct S0 { + unsigned f : 10; +}; + +struct S1 { + unsigned f : 32; +}; + +int main(void) +{ + struct S0 l = {1}; + struct S1 m = {1}; + printf("g = %d\n", (-1 >= l.f)); + printf("h = %d\n", (-1 >= m.f)); + return 0; +} |