From: Douglas Gregor Date: Fri, 1 May 2009 15:45:53 +0000 (+0000) Subject: Add testcase that illustrates the problem from r69699 regarding tentative definitions... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebe94114b14418c11e829e952c2ee92ea42585cb;p=clang Add testcase that illustrates the problem from r69699 regarding tentative definitions of statics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70543 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/tentative-decls.c b/test/CodeGen/tentative-decls.c index 7fb396a507..3301c234c5 100644 --- a/test/CodeGen/tentative-decls.c +++ b/test/CodeGen/tentative-decls.c @@ -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