aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/const-init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/const-init.cpp')
-rw-r--r--test/CodeGenCXX/const-init.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/CodeGenCXX/const-init.cpp b/test/CodeGenCXX/const-init.cpp
index 05896ff7db00..deb923a70890 100644
--- a/test/CodeGenCXX/const-init.cpp
+++ b/test/CodeGenCXX/const-init.cpp
@@ -1,4 +1,4 @@
-// RUN: not %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
// CHECK: @a = global i32 10
int a = 10;
@@ -74,5 +74,12 @@ void FoldableAddrLabelDiff() { static long x = (long)&&a-(long)&&b; a:b:return;}
int &i = reinterpret_cast<int&>(PR9558);
int arr[2];
-// CHECK: @pastEnd = constant i32* bitcast (i8* getelementptr (i8* bitcast ([2 x i32]* @arr to i8*), i64 8) to i32*)
+// CHECK: @pastEnd = constant i32* bitcast (i8* getelementptr (i8, i8* bitcast ([2 x i32]* @arr to i8*), i64 8) to i32*)
int &pastEnd = arr[2];
+
+struct X {
+ long n : 8;
+};
+long k;
+X x = {(long)&k};
+// CHECK: store i8 ptrtoint (i64* @k to i8), i8* getelementptr inbounds (%struct.X, %struct.X* @x, i32 0, i32 0)