Index: lib/Sema/SemaExpr.cpp
===================================================================
--- lib/Sema/SemaExpr.cpp	(revision 252044)
+++ lib/Sema/SemaExpr.cpp	(working copy)
@@ -1360,6 +1360,13 @@
     ControllingExpr = result.get();
   }
 
+  // After handling placeholder types, we need to decay and strip qualifiers
+  // for the controlling expression type. See committee discussion from
+  // WG14 DR423.
+  QualType ControllingQT = ControllingExpr->getType().getUnqualifiedType();
+  if (ControllingQT->canDecayToPointerType())
+    ControllingQT = Context.getDecayedType(ControllingQT);
+
   // The controlling expression is an unevaluated operand, so side effects are
   // likely unintended.
   if (ActiveTemplateInstantiations.empty() &&
@@ -1435,8 +1442,7 @@
   for (unsigned i = 0; i < NumAssocs; ++i) {
     if (!Types[i])
       DefaultIndex = i;
-    else if (Context.typesAreCompatible(ControllingExpr->getType(),
-                                        Types[i]->getType()))
+    else if (Context.typesAreCompatible(ControllingQT, Types[i]->getType()))
       CompatIndices.push_back(i);
   }
 
@@ -1448,7 +1454,7 @@
     // parenthesized in macro definitions.
     ControllingExpr = ControllingExpr->IgnoreParens();
     Diag(ControllingExpr->getLocStart(), diag::err_generic_sel_multi_match)
-      << ControllingExpr->getSourceRange() << ControllingExpr->getType()
+      << ControllingExpr->getSourceRange() << ControllingQT
       << (unsigned) CompatIndices.size();
     for (SmallVectorImpl<unsigned>::iterator I = CompatIndices.begin(),
          E = CompatIndices.end(); I != E; ++I) {
@@ -1468,7 +1474,7 @@
     // parenthesized in macro definitions.
     ControllingExpr = ControllingExpr->IgnoreParens();
     Diag(ControllingExpr->getLocStart(), diag::err_generic_sel_no_match)
-      << ControllingExpr->getSourceRange() << ControllingExpr->getType();
+      << ControllingExpr->getSourceRange() << ControllingQT;
     return ExprError();
   }
 
Index: test/Sema/generic-selection.c
===================================================================
--- test/Sema/generic-selection.c	(revision 252044)
+++ test/Sema/generic-selection.c	(working copy)
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 -std=c1x -fsyntax-only -verify %s
 
+void g(void);
+
 void foo(int n) {
   (void) _Generic(0,
       struct A: 0, // expected-error {{type 'struct A' in generic association incomplete}}
@@ -23,4 +25,10 @@
   int a4[_Generic(0L, default: 1, short: 2, float: 3, int: 4) == 1 ? 1 : -1];
   int a5[_Generic(0, int: 1, short: 2, float: 3) == 1 ? 1 : -1];
   int a6[_Generic(0, short: 1, float: 2, int: 3) == 3 ? 1 : -1];
+
+  int a7[_Generic("test", char *: 1, default: 2) == 1 ? 1 : -1];
+  int a8[_Generic(g, void (*)(void): 1, default: 2) == 1 ? 1 : -1];
+
+  const int i = 12;
+  int a9[_Generic(i, int: 1, default: 2) == 1 ? 1 : -1];
 }
