diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2008-01-22 22:36:45 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2008-01-22 22:36:45 +0000 |
commit | 09af71c2a606d1f67057f201bec0743df8bc834b (patch) | |
tree | cc2e841a6a0363ca0eec265ce9ad890fb5fb7cc4 /clang/test/CodeGen/bitfield.c | |
parent | 2ddcb25a3bb411165ddeb8c9c345ef7617e27211 (diff) | |
download | bcm5719-llvm-09af71c2a606d1f67057f201bec0743df8bc834b.tar.gz bcm5719-llvm-09af71c2a606d1f67057f201bec0743df8bc834b.zip |
Implement bitfield write.
llvm-svn: 46258
Diffstat (limited to 'clang/test/CodeGen/bitfield.c')
-rw-r--r-- | clang/test/CodeGen/bitfield.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/bitfield.c b/clang/test/CodeGen/bitfield.c index 51987655fd0..441a54a6732 100644 --- a/clang/test/CodeGen/bitfield.c +++ b/clang/test/CodeGen/bitfield.c @@ -3,6 +3,8 @@ // RUN: grep "ashr i32 %tmp1, 19" %t1 && // RUN: grep "shl i16 %tmp4, 1" %t1 && // RUN: grep "lshr i16 %tmp5, 9" %t1 +// RUN: grep "and i32 %tmp, -8192" %t1 +// RUN: grep "and i16 %tmp5, -32513" %t1 // Test bitfield access @@ -11,3 +13,9 @@ struct STestB1 { int a:13; char b; unsigned short c:7;} stb1; int f() { return stb1.a + stb1.b + stb1.c; } + +void g() { + stb1.a = -40; + stb1.b = 10; + stb1.c = 15; +} |