diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 9df8905..86f7745 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -651,17 +651,35 @@ 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());
+    }
+
+    if (const ConstantArrayType *CAT =
+           getContext().getAsConstantArrayType(FieldType)) {
+      QualType ElementType = CAT->getElementType();
+
+      // Check whether the most inner element type is destruct-able
+      // before pushing a cleanup
+      QualType TryMostInnerElmntT = ElementType;
+      while (const ConstantArrayType *TryArrT =
+                getContext().getAsConstantArrayType(TryMostInnerElmntT)) {
+        TryMostInnerElmntT = TryArrT->getElementType();
+      }
+
+      if (TryMostInnerElmntT.isDestructedType() != QualType::DK_cxx_destructor)
+        return;
+
+      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/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 (...) {}
+  }
+}
