summaryrefslogtreecommitdiffstats
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
commit033352b036080ac0b07c93d9bde1e5897525a0bd (patch)
tree825f5ab3e5bdfa2a9be8eedca056810c9d1afcdd
parent2a45575c718f76088e133989b1b87fe558bf7fd0 (diff)
downloadbcm5719-llvm-033352b036080ac0b07c93d9bde1e5897525a0bd.tar.gz
bcm5719-llvm-033352b036080ac0b07c93d9bde1e5897525a0bd.zip
add a testcase
llvm-svn: 50608
-rw-r--r--clang/test/CodeGen/init.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/CodeGen/init.c b/clang/test/CodeGen/init.c
index fd0735b69ef..9d18f0a767d 100644
--- a/clang/test/CodeGen/init.c
+++ b/clang/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 } };
+}
+
OpenPOWER on IntegriCloud