summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/decl.c')
-rw-r--r--test/CodeGen/decl.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/CodeGen/decl.c b/test/CodeGen/decl.c
index 6d06813..7ffb700 100644
--- a/test/CodeGen/decl.c
+++ b/test/CodeGen/decl.c
@@ -1,10 +1,14 @@
-// RUN: %clang_cc1 -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -w -emit-llvm < %s | FileCheck %s
// CHECK: @test1.x = internal constant [12 x i32] [i32 1
// CHECK: @test2.x = internal constant [13 x i32] [i32 1,
// CHECK: @test5w = global %0 { i32 2, [4 x i8] undef }
// CHECK: @test5y = global %union.test5u { double 7.300000e+0{{[0]*}}1 }
+// CHECK: @test6.x = internal constant %struct.SelectDest { i8 1, i8 2, i32 3, i32 0 }
+
+// CHECK: @test7 = global [2 x %struct.test7s] [%struct.test7s { i32 1, i32 2 }, %struct.test7s { i32 4, i32 0 }]
+
void test1() {
// This should codegen as a "@test1.x" global.
const int x[] = { 1, 2, 3, 4, 6, 8, 9, 10, 123, 231, 123,23 };
@@ -59,3 +63,29 @@ void test5() {
union test5u test5w = (union test5u)2;
union test5u test5y = (union test5u)73.0;
+
+
+// PR6660 - sqlite miscompile
+struct SelectDest {
+ unsigned char eDest;
+ unsigned char affinity;
+ int iParm;
+ int iMem;
+};
+
+void test6() {
+ struct SelectDest x = {1, 2, 3};
+ test6f(&x);
+}
+
+// rdar://7657600
+struct test7s { int a; int b; } test7[] = {
+ {1, 2},
+ {4},
+};
+
+// rdar://7872531
+#pragma pack(push, 2)
+struct test8s { int f0; char f1; } test8g = {};
+
+
OpenPOWER on IntegriCloud