diff options
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; +} |