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..fef7386 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -32,44 +32,82 @@ using namespace clang;
 // Sema Initialization Checking
 //===----------------------------------------------------------------------===//
 
-static Expr *IsStringInit(Expr *Init, const ArrayType *AT,
-                          ASTContext &Context) {
+enum StringInitFailureKind {
+  SIF_None,
+  SIF_NarrowStringIntoWideChar,
+  SIF_WideStringIntoChar,
+  SIF_IncompatWideStringIntoWideChar,
+  SIF_Other
+};
+
+/// \brief Check whether the array of type AT can be initialized by the Init
+/// expression by means of string initialization. Returns SIF_None if so,
+/// otherwise returns a StringInitFailureKind that describes why the
+/// initialization would not work.
+static StringInitFailureKind IsStringInit(Expr *Init, const ArrayType *AT,
+                                          ASTContext &Context) {
   if (!isa<ConstantArrayType>(AT) && !isa<IncompleteArrayType>(AT))
-    return 0;
+    return SIF_Other;
 
   // See if this is a string literal or @encode.
   Init = Init->IgnoreParens();
 
   // Handle @encode, which is a narrow string.
   if (isa<ObjCEncodeExpr>(Init) && AT->getElementType()->isCharType())
-    return Init;
+    return SIF_None;
 
   // Otherwise we can only handle string literals.
   StringLiteral *SL = dyn_cast<StringLiteral>(Init);
-  if (SL == 0) return 0;
+  if (SL == 0)
+    return SIF_Other;
+
+  const QualType ElemTy =
+      Context.getCanonicalType(AT->getElementType()).getUnqualifiedType();
 
-  QualType ElemTy = Context.getCanonicalType(AT->getElementType());
+  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 SIF_None;
+    if (ElemTyIsWideChar)
+      return SIF_NarrowStringIntoWideChar;
+    return SIF_Other;
+  // 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 SIF_None;
+    if (ElemTy->isCharType())
+      return SIF_WideStringIntoChar;
+    if (ElemTyIsWideChar)
+      return SIF_IncompatWideStringIntoWideChar;
+    return SIF_Other;
   case StringLiteral::UTF32:
-    return ElemTy->isChar32Type() ? Init : 0;
+    if (Context.typesAreCompatible(Context.Char32Ty, ElemTy))
+      return SIF_None;
+    if (ElemTy->isCharType())
+      return SIF_WideStringIntoChar;
+    if (ElemTyIsWideChar)
+      return SIF_IncompatWideStringIntoWideChar;
+    return SIF_Other;
   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()))
-      return Init;
-
-    return 0;
+    if (Context.typesAreCompatible(Context.getWideCharType(), ElemTy))
+      return SIF_None;
+    if (ElemTy->isCharType())
+      return SIF_WideStringIntoChar;
+    if (ElemTyIsWideChar)
+      return SIF_IncompatWideStringIntoWideChar;
+    return SIF_Other;
   }
 
   llvm_unreachable("missed a StringLiteral kind?");
@@ -79,7 +117,7 @@ static Expr *IsStringInit(Expr *init, QualType declType, ASTContext &Context) {
   const ArrayType *arrayType = Context.getAsArrayType(declType);
   if (!arrayType) return 0;
 
-  return IsStringInit(init, arrayType, Context);
+  return IsStringInit(init, arrayType, Context) == SIF_None ? init : 0;
 }
 
 /// Update the type of a string literal, including any surrounding parentheses,
@@ -806,10 +844,10 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity,
     // array member.  There's nothing we can do with the completed
     // type here, though.
 
-    if (Expr *Str = IsStringInit(expr, arrayType, SemaRef.Context)) {
+    if (IsStringInit(expr, arrayType, SemaRef.Context) == SIF_None) {
       if (!VerifyOnly) {
-        CheckStringInit(Str, ElemType, arrayType, SemaRef);
-        UpdateStructuredListElement(StructuredList, StructuredIndex, Str);
+        CheckStringInit(expr, ElemType, arrayType, SemaRef);
+        UpdateStructuredListElement(StructuredList, StructuredIndex, expr);
       }
       ++Index;
       return;
@@ -1189,16 +1227,17 @@ void InitListChecker::CheckArrayType(const InitializedEntity &Entity,
 
   // Check for the special-case of initializing an array with a string.
   if (Index < IList->getNumInits()) {
-    if (Expr *Str = IsStringInit(IList->getInit(Index), arrayType,
-                                 SemaRef.Context)) {
+    if (IsStringInit(IList->getInit(Index), arrayType, SemaRef.Context) ==
+        SIF_None) {
       // We place the string literal directly into the resulting
       // initializer list. This is the only place where the structure
       // of the structured initializer list doesn't match exactly,
       // because doing so would involve allocating one character
       // constant for each string.
       if (!VerifyOnly) {
-        CheckStringInit(Str, DeclType, arrayType, SemaRef);
-        UpdateStructuredListElement(StructuredList, StructuredIndex, Str);
+        CheckStringInit(IList->getInit(Index), DeclType, arrayType, SemaRef);
+        UpdateStructuredListElement(StructuredList, StructuredIndex,
+                                    IList->getInit(Index));
         StructuredList->resizeInits(SemaRef.Context, StructuredIndex);
       }
       ++Index;
@@ -2507,6 +2546,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,9 +4320,23 @@ InitializationSequence::InitializationSequence(Sema &S,
       return;
     }
 
-    if (Initializer && IsStringInit(Initializer, DestAT, Context)) {
-      TryStringLiteralInitialization(S, Entity, Kind, Initializer, *this);
-      return;
+    if (Initializer) {
+      switch (IsStringInit(Initializer, DestAT, Context)) {
+      case SIF_None:
+        TryStringLiteralInitialization(S, Entity, Kind, Initializer, *this);
+        return;
+      case SIF_NarrowStringIntoWideChar:
+        SetFailed(FK_NarrowStringIntoWideCharArray);
+        return;
+      case SIF_WideStringIntoChar:
+        SetFailed(FK_WideStringIntoCharArray);
+        return;
+      case SIF_IncompatWideStringIntoWideChar:
+        SetFailed(FK_IncompatWideStringIntoWideChar);
+        return;
+      case SIF_Other:
+        break;
+      }
     }
 
     // Note: as an GNU C extension, we allow initialization of an
@@ -4307,9 +4363,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 +5877,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 +6258,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}}
+}
