diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 9df8905..54f89c6 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -651,17 +651,21 @@ void CodeGenFunction::EmitInitializerForField(FieldDecl *Field,
     if (!CGM.getLangOpts().Exceptions)
       return;
 
-    // FIXME: If we have an array of classes w/ non-trivial destructors, 
-    // we need to destroy in reverse order of construction along the exception
-    // path.
-    const RecordType *RT = FieldType->getAs<RecordType>();
-    if (!RT)
-      return;
-    
-    CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
-    if (!RD->hasTrivialDestructor())
-      EHStack.pushCleanup<CallMemberDtor>(EHCleanup, LHS.getAddress(),
-                                          RD->getDestructor());
+    // Handle the situation if constructors throw exception.
+    if (const RecordType *RT = FieldType->getAs<RecordType>()) {
+      CXXRecordDecl *RD = cast<CXXRecordDecl>(RT->getDecl());
+      if (!RD->hasTrivialDestructor())
+        EHStack.pushCleanup<CallMemberDtor>(EHCleanup, LHS.getAddress(),
+                                            RD->getDestructor());
+    } else if (const ConstantArrayType *CAT =
+                  getContext().getAsConstantArrayType(FieldType)) {
+      QualType ElementType = CAT->getElementType();
+      llvm::Value *Begin = LHS.getAddress();
+      llvm::Value *Num = emitArrayLength(CAT, ElementType, Begin);
+      llvm::Value *End = Builder.CreateInBoundsGEP(Begin, Num);
+      pushRegularPartialArrayCleanup(Begin, End, ElementType,
+                                     getDestroyer(QualType::DK_cxx_destructor));
+    }
   }
 }
 
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index e01d56b..2edc7bf 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -1367,6 +1367,9 @@ static void emitPartialArrayDestroy(CodeGenFunction &CGF,
     type = arrayType->getElementType();
   }
 
+  if (type.isDestructedType() == QualType::DK_none)
+    return; // Check again for nest array
+
   if (arrayDepth) {
     llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, arrayDepth+1);
 
diff --git a/test/CodeGenCXX/exceptions.cpp b/test/CodeGenCXX/exceptions.cpp
index 723e8d1..a989a27 100644
--- a/test/CodeGenCXX/exceptions.cpp
+++ b/test/CodeGenCXX/exceptions.cpp
@@ -451,3 +451,36 @@ namespace test10 {
   // CHECK:      invoke void @__cxa_rethrow()
   // CHECK:      unreachable
 }
+
+// If constructor throws exception, we need to destruct its fields
+// in reverse order
+namespace test11 {
+  struct A {
+    ~A() {}
+  };
+
+  struct C {
+    A single;
+    A array[2][3];
+
+    C() {
+      throw 0;
+    }
+  };
+  // CHECK:      define linkonce_odr void @_ZN6test111CC2Ev(
+  // CHECK:        [[SINGLE:%.*]] = getelementptr inbounds {{.*}}
+  // CHECK-NEXT:   [[ARRAY:%.*]] = getelementptr inbounds {{.*}}
+  // CHECK-NEXT:   [[ARRAYBEGIN:%.*]] = getelementptr inbounds [2 x [3 x %"struct.test11::A"]]* [[ARRAY]], i32 0, i32 0, i32 0
+  // CHECK-NEXT:   [[ARRAYEND:%.*]] = getelementptr inbounds %"struct.test11::A"* [[ARRAYBEGIN]], i64 6
+
+  // CHECK:        [[ARRAYELEMENTPAST:%.*]] = phi {{.*}} [[ARRAYEND]]
+  // CHECK-NEXT:   [[ARRAYELEMENT:%.*]] = getelementptr inbounds %"struct.test11::A"* [[ARRAYELEMENTPAST]], i64 -1
+  // CHECK-NEXT:   invoke void @_ZN6test111AD1Ev(%"struct.test11::A"* [[ARRAYELEMENT]])
+
+  // CHECK:        {{.*}} icmp eq %"struct.test11::A"* [[ARRAYELEMENT]], [[ARRAYBEGIN]]
+  // CHECK-NEXT    invoke void @_ZN6test111AD1Ev(%"struct.test11::A"* [[SINGLE]])
+
+  void foo() {
+    try { C c; } catch (...) {}
+  }
+}
