aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/init.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-04 00:56:25 +0000
committerChris Lattner <sabre@nondot.org>2008-05-04 00:56:25 +0000
commitd3c3856c159ff74794b55d1b5e39c0fa78bf0095 (patch)
treeeffcae83b4732f593e97ce65a7b2f518b54d29eb /test/CodeGen/init.c
parent3e56e0b8b285e86eed4d191b1da93ded7382a847 (diff)
add a testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/init.c')
-rw-r--r--test/CodeGen/init.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGen/init.c b/test/CodeGen/init.c
index fd0735b69e..9d18f0a767 100644
--- a/test/CodeGen/init.c
+++ b/test/CodeGen/init.c
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm %s
+// RUN: clang -emit-llvm %s -o -
void f1() {
// Scalars in braces.
int a = { 1 };
@@ -13,3 +13,11 @@ void f2() {
int *e[3][3] = { {&a[1][1], &b[2][2]}, {&a[0][0], &b[1][1]} };
char ext[3][3] = {".Y",".U",".V"};
}
+
+typedef void (* F)(void);
+extern void foo(void);
+struct S { F f; };
+void f3() {
+ struct S a[1] = { { foo } };
+}
+