diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/bitfield-2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/bitfield-2.c b/test/CodeGen/bitfield-2.c index 79033d7f7b..94f275d7d5 100644 --- a/test/CodeGen/bitfield-2.c +++ b/test/CodeGen/bitfield-2.c @@ -205,3 +205,19 @@ unsigned long long test_5() { res ^= g5.f0 ^ g5.f1 ^ g5.f2; return res; } + +struct A { + _Bool b : 2; +}; + +// CHECK-OPT: define zeroext i1 @test_6() +// CHECK-OPT: ret i1 true +// CHECK-OPT: } +_Bool test_6() { + struct A a; + + a.b = (_Bool)0; + + return (a.b = !a.b); +} + |