Index: lib/Sema/SemaCXXCast.cpp
===================================================================
--- lib/Sema/SemaCXXCast.cpp	(revision 113137)
+++ lib/Sema/SemaCXXCast.cpp	(working copy)
@@ -943,7 +943,7 @@
 TryStaticImplicitCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
                       bool CStyle, const SourceRange &OpRange, unsigned &msg,
                       CastKind &Kind) {
-  if (DestType->isRecordType()) {
+  if (DestType->isRecordType() || DestType->isEnumeralType()) {
     if (Self.RequireCompleteType(OpRange.getBegin(), DestType,
                                  diag::err_bad_dynamic_cast_incomplete)) {
       msg = 0;
Index: test/SemaCXX/enum.cpp
===================================================================
--- test/SemaCXX/enum.cpp	(revision 113137)
+++ test/SemaCXX/enum.cpp	(working copy)
@@ -87,6 +87,11 @@
 typedef enum { }; // expected-warning{{typedef requires a name}}
 
 // PR7921
-enum PR7921E {
-    PR7921V = (PR7921E)(123) // expected-error {{expression is not an integer constant expression}}
+enum PR7921E { // expected-note{{definition of 'PR7921E' is not complete until the closing '}'}}
+    PR7921V = (PR7921E)(123) // expected-error {{'PR7921E' is an incomplete type}}
 };
+
+// PR8089
+enum PR8089;  // expected-error{{ISO C++ forbids forward references to 'enum' types}} // expected-note{{forward declaration of 'PR8089'}}
+int var = (PR8089)2; // expected-error {{'PR8089' is an incomplete type}}
+
