Index: AST/Expr.cpp =================================================================== --- AST/Expr.cpp (revision 43994) +++ AST/Expr.cpp (working copy) @@ -394,6 +394,13 @@ case UnaryOperatorClass: { const UnaryOperator *Exp = cast(this); + // C99 6.6p9 + if (Exp->getOpcode() == UnaryOperator::AddrOf) + if (DeclRefExpr *DRE = dyn_cast(Exp->getSubExpr())) + if (VarDecl *VD = dyn_cast(DRE->getDecl())) + if (VD->hasStaticStorage()) + return true; + // Get the operand value. If this is sizeof/alignof, do not evalute the // operand. This affects C99 6.6p3. if (!Exp->isSizeOfAlignOfOp() && Index: test/Sema/address-constant.c =================================================================== --- test/Sema/address-constant.c (revision 0) +++ test/Sema/address-constant.c (revision 0) @@ -0,0 +1,4 @@ +// RUN: clang -fsyntax-only -verify %s + +int a; +int *b[] = {&a};