]> granicus.if.org Git - clang/commitdiff
Add testcase that illustrates the problem from r69699 regarding tentative definitions...
authorDouglas Gregor <dgregor@apple.com>
Fri, 1 May 2009 15:45:53 +0000 (15:45 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 1 May 2009 15:45:53 +0000 (15:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70543 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/tentative-decls.c

index 7fb396a5078f89895459397278673543702d4c32..3301c234c55aed12298e5a9eb61a71480f1b7e81 100644 (file)
@@ -30,4 +30,10 @@ int *f1() {
 int c[];
 int c[4];
 
+// Check that we emit static tentative definitions
+// RUN: grep '@c5 = internal global \[1 x .*\] zeroinitializer' %t &&
+static int c5[];
+static int func() { return c5[0]; }
+int callfunc() { return func(); }
+
 // RUN: true