Index: lib/AST/DeclCXX.cpp =================================================================== --- lib/AST/DeclCXX.cpp +++ lib/AST/DeclCXX.cpp @@ -739,7 +739,7 @@ } if (!Field->hasInClassInitializer() && !Field->isMutable()) { - if (CXXRecordDecl *FieldType = Field->getType()->getAsCXXRecordDecl()) { + if (CXXRecordDecl *FieldType = T->getAsCXXRecordDecl()) { if (FieldType->hasDefinition() && !FieldType->allowConstDefaultInit()) data().HasUninitializedFields = true; } else { Index: test/SemaCXX/constexpr-value-init.cpp =================================================================== --- test/SemaCXX/constexpr-value-init.cpp +++ test/SemaCXX/constexpr-value-init.cpp @@ -35,3 +35,12 @@ constexpr Z() : V() {} }; constexpr int n = Z().c; // expected-error {{constant expression}} expected-note {{virtual base class}} + +struct E { + A a[2]; +}; +constexpr E e; // ok +static_assert(e.a[0].a == 1, ""); +static_assert(e.a[0].b == 2, ""); +static_assert(e.a[1].a == 1, ""); +static_assert(e.a[1].b == 2, "");