diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index c272882..3d46f04 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -4281,6 +4281,12 @@ def err_typecheck_incomplete_array_needs_initializer : Error<
 def err_array_init_not_init_list : Error<
   "array initializer must be an initializer "
   "list%select{| or string literal}0">;
+def err_array_init_narrow_string_into_wchar : Error<
+  "initializing wide char array with non-wide string literal">;
+def err_array_init_wide_string_into_char : Error<
+  "initializing char array with wide string literal">;
+def err_array_init_incompat_wide_string_into_wchar : Error<
+  "initializing wide char array with incompatible wide string literal">;
 def err_array_init_different_type : Error<
   "cannot initialize array %diff{of type $ with array of type $|"
   "with different type of array}0,1">;
diff --git a/include/clang/Sema/Initialization.h b/include/clang/Sema/Initialization.h
index 58781ac..0d2b871 100644
--- a/include/clang/Sema/Initialization.h
+++ b/include/clang/Sema/Initialization.h
@@ -706,6 +706,13 @@ public:
     /// \brief Array must be initialized with an initializer list or a 
     /// string literal.
     FK_ArrayNeedsInitListOrStringLiteral,
+    /// \brief Initializing a wide char array with narrow string literal.
+    FK_NarrowStringIntoWideCharArray,
+    /// \brief Initializing char array with wide string literal.
+    FK_WideStringIntoCharArray,
+    /// \brief Initializing wide char array with incompatible wide string
+    /// literal.
+    FK_IncompatWideStringIntoWideChar,
     /// \brief Array type mismatch.
     FK_ArrayTypeMismatch,
     /// \brief Non-constant array initializer
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 7016e56..6cca36c 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -32,8 +32,20 @@ using namespace clang;
 // Sema Initialization Checking
 //===----------------------------------------------------------------------===//
 
+enum StringInitFailureKind {
+  SIF_None,
+  SIF_NarrowStringIntoWideChar,
+  SIF_WideStringIntoChar,
+  SIF_IncompatWideStringIntoWideChar
+};
+
+/// \brief Check whether the array of type AT can be initialized by the Init
+/// expression by means of string initialization. Returns Init if so, 0
+/// otherwise. If SIF is non-null, it may be set to indicate why string
+/// string initialization is not possible.
 static Expr *IsStringInit(Expr *Init, const ArrayType *AT,
-                          ASTContext &Context) {
+                          ASTContext &Context,
+                          StringInitFailureKind *SIF = 0) {
   if (!isa<ConstantArrayType>(AT) && !isa<IncompleteArrayType>(AT))
     return 0;
 
@@ -48,27 +60,52 @@ static Expr *IsStringInit(Expr *Init, const ArrayType *AT,
   StringLiteral *SL = dyn_cast<StringLiteral>(Init);
   if (SL == 0) return 0;
 
-  QualType ElemTy = Context.getCanonicalType(AT->getElementType());
+  const QualType ElemTy =
+      Context.getCanonicalType(AT->getElementType()).getUnqualifiedType();
+
+  const bool ElemTyIsWideChar = Context.typesAreCompatible(
+      Context.getWideCharType(), ElemTy) ||
+      Context.typesAreCompatible(Context.Char16Ty, ElemTy) ||
+      Context.typesAreCompatible(Context.Char32Ty, ElemTy);
 
   switch (SL->getKind()) {
   case StringLiteral::Ascii:
   case StringLiteral::UTF8:
     // char array can be initialized with a narrow string.
     // Only allow char x[] = "foo";  not char x[] = L"foo";
-    return ElemTy->isCharType() ? Init : 0;
+    if (ElemTy->isCharType())
+      return Init;
+    if (SIF && ElemTyIsWideChar)
+      *SIF = SIF_NarrowStringIntoWideChar;
+    return 0;
+  // C99 6.7.8p15 (with correction from DR343), or C11 6.7.9p15:
+  // "An array with element type compatible with a qualified or unqualified
+  // version of wchar_t, char16_t, or char32_t may be initialized by a wide
+  // string literal with the corresponding encoding prefix (L, u, or U,
+  // respectively), optionally enclosed in braces.
   case StringLiteral::UTF16:
-    return ElemTy->isChar16Type() ? Init : 0;
+    if (Context.typesAreCompatible(Context.Char16Ty, ElemTy))
+      return Init;
+    if (SIF && ElemTy->isCharType())
+      *SIF = SIF_WideStringIntoChar;
+    if (SIF && ElemTyIsWideChar)
+      *SIF = SIF_IncompatWideStringIntoWideChar;
+    return 0;
   case StringLiteral::UTF32:
-    return ElemTy->isChar32Type() ? Init : 0;
+    if (Context.typesAreCompatible(Context.Char32Ty, ElemTy))
+      return Init;
+    if (SIF && ElemTy->isCharType())
+      *SIF = SIF_WideStringIntoChar;
+    if (SIF && ElemTyIsWideChar)
+      *SIF = SIF_IncompatWideStringIntoWideChar;
+    return 0;
   case StringLiteral::Wide:
-    // wchar_t array can be initialized with a wide string: C99 6.7.8p15 (with
-    // correction from DR343): "An array with element type compatible with a
-    // qualified or unqualified version of wchar_t may be initialized by a wide
-    // string literal, optionally enclosed in braces."
-    if (Context.typesAreCompatible(Context.getWideCharType(),
-                                   ElemTy.getUnqualifiedType()))
+    if (Context.typesAreCompatible(Context.getWideCharType(), ElemTy))
       return Init;
-
+    if (SIF && ElemTy->isCharType())
+      *SIF = SIF_WideStringIntoChar;
+    if (SIF && ElemTyIsWideChar)
+      *SIF = SIF_IncompatWideStringIntoWideChar;
     return 0;
   }
 
@@ -2507,6 +2544,9 @@ bool InitializationSequence::isAmbiguous() const {
   case FK_TooManyInitsForReference:
   case FK_ArrayNeedsInitList:
   case FK_ArrayNeedsInitListOrStringLiteral:
+  case FK_NarrowStringIntoWideCharArray:
+  case FK_WideStringIntoCharArray:
+  case FK_IncompatWideStringIntoWideChar:
   case FK_AddressOfOverloadFailed: // FIXME: Could do better
   case FK_NonConstLValueReferenceBindingToTemporary:
   case FK_NonConstLValueReferenceBindingToUnrelated:
@@ -4278,10 +4318,24 @@ InitializationSequence::InitializationSequence(Sema &S,
       return;
     }
 
-    if (Initializer && IsStringInit(Initializer, DestAT, Context)) {
+    StringInitFailureKind SIF = SIF_None;
+    if (Initializer && IsStringInit(Initializer, DestAT, Context, &SIF)) {
       TryStringLiteralInitialization(S, Entity, Kind, Initializer, *this);
       return;
     }
+    switch (SIF) {
+    case SIF_None:
+      break;
+    case SIF_NarrowStringIntoWideChar:
+      SetFailed(FK_NarrowStringIntoWideCharArray);
+      return;
+    case SIF_WideStringIntoChar:
+      SetFailed(FK_WideStringIntoCharArray);
+      return;
+    case SIF_IncompatWideStringIntoWideChar:
+      SetFailed(FK_IncompatWideStringIntoWideChar);
+      return;
+    }
 
     // Note: as an GNU C extension, we allow initialization of an
     // array from a compound literal that creates an array of the same
@@ -4307,9 +4361,10 @@ InitializationSequence::InitializationSequence(Sema &S,
       TryListInitialization(S, Entity, Kind, cast<InitListExpr>(Initializer),
                             *this);
       AddParenthesizedArrayInitStep(DestType);
-    } else if (DestAT->getElementType()->isAnyCharacterType())
+    } else if (DestAT->getElementType()->isAnyCharacterType() &&
+               !isa<StringLiteral>(Initializer->IgnoreParens())) {
       SetFailed(FK_ArrayNeedsInitListOrStringLiteral);
-    else
+    } else
       SetFailed(FK_ArrayNeedsInitList);
 
     return;
@@ -5820,7 +5875,16 @@ bool InitializationSequence::Diagnose(Sema &S,
     S.Diag(Kind.getLocation(), diag::err_array_init_not_init_list)
       << (Failure == FK_ArrayNeedsInitListOrStringLiteral);
     break;
-
+  case FK_NarrowStringIntoWideCharArray:
+    S.Diag(Kind.getLocation(), diag::err_array_init_narrow_string_into_wchar);
+    break;
+  case FK_WideStringIntoCharArray:
+    S.Diag(Kind.getLocation(), diag::err_array_init_wide_string_into_char);
+    break;
+  case FK_IncompatWideStringIntoWideChar:
+    S.Diag(Kind.getLocation(),
+           diag::err_array_init_incompat_wide_string_into_wchar);
+    break;
   case FK_ArrayTypeMismatch:
   case FK_NonConstantArrayInit:
     S.Diag(Kind.getLocation(), 
@@ -6192,6 +6256,18 @@ void InitializationSequence::dump(raw_ostream &OS) const {
       OS << "array requires initializer list or string literal";
       break;
 
+    case FK_NarrowStringIntoWideCharArray:
+      OS << "narrow string into wide char array";
+      break;
+
+    case FK_WideStringIntoCharArray:
+      OS << "wide string into char array";
+      break;
+
+    case FK_IncompatWideStringIntoWideChar:
+      OS << "incompatible wide string into wide char array";
+      break;
+
     case FK_ArrayTypeMismatch:
       OS << "array type mismatch";
       break;
diff --git a/test/Lexer/char-literal.cpp b/test/Lexer/char-literal.cpp
index b2fab34..1cd14a9 100644
--- a/test/Lexer/char-literal.cpp
+++ b/test/Lexer/char-literal.cpp
@@ -36,8 +36,4 @@ char16_t p[2] = u"\U0000FFFF";
 char16_t q[2] = u"\U00010000";
 #ifdef __cplusplus
 // expected-error@-2 {{too long}}
-#else
-// FIXME: The above should be accepted in C11 mode.
-// expected-error@-6 {{must be an initializer list}}
-// expected-error@-6 {{must be an initializer list}}
 #endif
diff --git a/test/Sema/ms-wchar.c b/test/Sema/ms-wchar.c
index 52a736c..e3a85ac 100644
--- a/test/Sema/ms-wchar.c
+++ b/test/Sema/ms-wchar.c
@@ -12,4 +12,4 @@ __wchar_t g = L'a'; // expected-note {{previous}}
 unsigned short g; // expected-error {{redefinition of 'g' with a different type: 'unsigned short' vs '__wchar_t'}}
 
 // The type of a wide string literal is actually not __wchar_t.
-__wchar_t s[] = L"Hello world!"; // expected-error {{array initializer must be an initializer list}}
+__wchar_t s[] = L"Hello world!"; // expected-error-re {{array initializer must be an initializer list$}}
diff --git a/test/Sema/string-init.c b/test/Sema/string-init.c
new file mode 100644
index 0000000..ea6b0e8
--- /dev/null
+++ b/test/Sema/string-init.c
@@ -0,0 +1,44 @@
+// RUN: %clang_cc1 -std=c11 -fsyntax-only -triple x86_64-pc-linux -verify %s
+
+// Note: these match the types specified by the target above.
+typedef int wchar_t;
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+
+void f() {
+  char a1[] = "a"; // No error.
+  char a2[] = u8"a"; // No error.
+  char a3[] = u"a"; // expected-error{{initializing char array with wide string literal}}
+  char a4[] = U"a"; // expected-error{{initializing char array with wide string literal}}
+  char a5[] = L"a"; // expected-error{{initializing char array with wide string literal}}
+
+  wchar_t b1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  wchar_t b2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  wchar_t b3[] = u"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  wchar_t b4[] = U"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  wchar_t b5[] = L"a"; // No error.
+
+  char16_t c1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char16_t c2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char16_t c3[] = u"a"; // No error.
+  char16_t c4[] = U"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  char16_t c5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+
+  char32_t d1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char32_t d2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char32_t d3[] = u"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  char32_t d4[] = U"a"; // No error.
+  char32_t d5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+
+  int e1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  int e2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  int e3[] = u"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  int e4[] = U"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  int e5[] = L"a"; // No error.
+
+  long f1[] = "a"; // expected-error{{array initializer must be an initializer list}}
+  long f2[] = u8"a"; // expected-error{{array initializer must be an initializer list}}}
+  long f3[] = u"a"; // expected-error{{array initializer must be an initializer list}}
+  long f4[] = U"a"; // expected-error{{array initializer must be an initializer list}}
+  long f5[] = L"a"; // expected-error{{array initializer must be an initializer list}}
+}
diff --git a/test/Sema/wchar.c b/test/Sema/wchar.c
index 816245f..13c2f58 100644
--- a/test/Sema/wchar.c
+++ b/test/Sema/wchar.c
@@ -19,6 +19,6 @@ int check_wchar_size[sizeof(*L"") == sizeof(wchar_t) ? 1 : -1];
 void foo() {
   WCHAR_T_TYPE t1[] = L"x";
   wchar_t tab[] = L"x";
-  WCHAR_T_TYPE t2[] = "x";     // expected-error {{initializer}}
-  char t3[] = L"x";   // expected-error {{initializer}}
+  WCHAR_T_TYPE t2[] = "x";     // expected-error {{initializing wide char array with non-wide string literal}}
+  char t3[] = L"x";   // expected-error {{initializing char array with wide string literal}}
 }
diff --git a/test/SemaCXX/string-init.cpp b/test/SemaCXX/string-init.cpp
new file mode 100644
index 0000000..e9d3d2a
--- /dev/null
+++ b/test/SemaCXX/string-init.cpp
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+
+void f() {
+  char a1[] = "a"; // No error.
+  char a2[] = u8"a"; // No error.
+  char a3[] = u"a"; // expected-error{{initializing char array with wide string literal}}
+  char a4[] = U"a"; // expected-error{{initializing char array with wide string literal}}
+  char a5[] = L"a"; // expected-error{{initializing char array with wide string literal}}
+
+  wchar_t b1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  wchar_t b2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  wchar_t b3[] = u"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  wchar_t b4[] = U"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  wchar_t b5[] = L"a"; // No error.
+
+  char16_t c1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char16_t c2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char16_t c3[] = u"a"; // No error.
+  char16_t c4[] = U"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  char16_t c5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+
+  char32_t d1[] = "a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char32_t d2[] = u8"a"; // expected-error{{initializing wide char array with non-wide string literal}}
+  char32_t d3[] = u"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+  char32_t d4[] = U"a"; // No error.
+  char32_t d5[] = L"a"; // expected-error{{initializing wide char array with incompatible wide string literal}}
+
+  int e1[] = "a"; // expected-error{{array initializer must be an initializer list}}
+  int e2[] = u8"a"; // expected-error{{array initializer must be an initializer list}}
+  int e3[] = u"a"; // expected-error{{array initializer must be an initializer list}}
+  int e4[] = U"a"; // expected-error{{array initializer must be an initializer list}}
+  int e5[] = L"a"; // expected-error{{array initializer must be an initializer list}}
+}
