summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/flexible-array-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/flexible-array-init.c')
-rw-r--r--clang/test/CodeGen/flexible-array-init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGen/flexible-array-init.c b/clang/test/CodeGen/flexible-array-init.c
new file mode 100644
index 0000000..d3079dc
--- /dev/null
+++ b/clang/test/CodeGen/flexible-array-init.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+
+struct { int x; int y[]; } a = { 1, 7, 11 };
+// CHECK: @a = global { i32, [2 x i32] } { i32 1, [2 x i32] [i32 7, i32 11] }
+
+struct { int x; int y[]; } b = { 1, { 13, 15 } };
+// CHECK: @b = global { i32, [2 x i32] } { i32 1, [2 x i32] [i32 13, i32 15] }