// RUN: %clang_cc1 %s -emit-llvm-only -verify
// expected-no-diagnostics
// PR5489
template<typename E>structBar{int x_;};staticstructBar<int> bar[1] = {{0}};namespaceincomplete_type_refs{structA;extern A g[];voidfoo(A*);voidf(void){foo(g);// Reference to array with unknown element type.
}structA{// define the element type.
int a,b,c;};
A *f2(){return&g[1];}}namespacePR10395{structT;extern T x[];
T*f(){return x;}}namespacePR10384{structX;extern X x[1];
X*f(){return x;}}