]> granicus.if.org Git - clang/commitdiff
add a testcase
authorChris Lattner <sabre@nondot.org>
Sun, 4 May 2008 00:56:25 +0000 (00:56 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 4 May 2008 00:56:25 +0000 (00:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50608 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/init.c

index fd0735b69effff740b8f095f96984cae3b17ccde..9d18f0a767d59bff07d58bde9125854206c0093d 100644 (file)
@@ -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 } };
+}
+