summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/const-init.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
committerdim <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
commitc86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch)
tree3eb853da77d46cc77c4b017525a422f9ddb1385b /test/CodeGen/const-init.c
parentc696171ff15f0ee60dea4abfd99a135473c95656 (diff)
downloadFreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip
FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'test/CodeGen/const-init.c')
-rw-r--r--test/CodeGen/const-init.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c
index 7d7ccae..b86274f 100644
--- a/test/CodeGen/const-init.c
+++ b/test/CodeGen/const-init.c
@@ -159,3 +159,25 @@ void g29() {
static int b[1] = { "asdf" }; // expected-warning {{incompatible pointer to integer conversion initializing 'int' with an expression of type 'char [5]'}}
static int c[1] = { L"a" };
}
+
+// PR21300
+void g30() {
+#pragma pack(1)
+ static struct {
+ int : 1;
+ int x;
+ } a = {};
+ // CHECK: @g30.a = internal global %struct.anon.1 <{ i8 undef, i32 0 }>, align 1
+#pragma pack()
+}
+
+void g31() {
+#pragma pack(4)
+ static struct {
+ short a;
+ long x;
+ short z;
+ } a = {23122, -12312731, -312};
+#pragma pack()
+ // CHECK: @g31.a = internal global %struct.anon.2 { i16 23122, i32 -12312731, i16 -312 }, align 4
+}
OpenPOWER on IntegriCloud