Migrate and FileCheck-ize some of:

2003-09-18-BitfieldTests.c 2007-04-11-PR1321.c 2003-11-13-TypeSafety.c 2003-08-29-StructLayoutBug.c 2010-05-14-Optimized-VarType.c 2003-10-06-NegateExprType.c 2007-06-05-NoInlineAttribute.c 2011-03-31-ArrayRefFolding.c 2010-07-14-ref-off-end.c Atomics-no64bit.c 2007-05-11-str-const.c 2004-11-27-InvalidConstantExpr.c 2007-04-05-UnPackedStruct.c 2004-03-15-SimpleIndirectGoto.c 2004-01-08-ExternInlineRedefine.c sret2.c 2007-02-07-AddrLabel.c 2002-09-19-StarInLabel.c 2003-11-16-StaticArrayInit.c 2003-08-18-SigSetJmp.c 2007-04-24-VolatileStructCopy.c 2002-07-29-Casts.c 2005-06-15-ExpandGotoInternalProblem.c 2007-09-17-WeakRef.c 2007-04-24-str-const.c 2003-08-30-LargeIntegerBitfieldMember.c inline-asm-mrv.c

from llvm/test/FrontendC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/2003-09-18-BitfieldTests.c b/test/CodeGen/2003-09-18-BitfieldTests.c
new file mode 100644
index 0000000..6807f5a
--- /dev/null
+++ b/test/CodeGen/2003-09-18-BitfieldTests.c
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -w -emit-llvm %s  -o /dev/null
+
+
+typedef struct BF {
+  int A : 1;
+  char B;
+  int C : 13;
+} BF;
+
+char *test1(BF *b) {
+  return &b->B;        // Must be able to address non-bitfield
+}
+
+void test2(BF *b) {    // Increment and decrement operators
+  b->A++;
+  --b->C;
+}
+
+void test3(BF *b) {
+   b->C = 12345;        // Store
+}
+
+int test4(BF *b) {
+  return b->C;         // Load
+}
+
+void test5(BF *b, int i) { // array ref
+  b[i].C = 12345;
+}
+