/cp
2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
	PR c++/53624
	* pt.c (check_default_tmpl_args): Don't check local types.
/testsuite
2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
	PR c++/53624
	* g++.dg/cpp0x/temp_default5.C: New.
From-SVN: r190001
+2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/53624
+       * pt.c (check_default_tmpl_args): Don't check local types.
+
 2012-07-25  Sandra Loosemore  <sandra@codesourcery.com>
            Paul Brook  <paul@codesourcery.com>
 
        PR target/53633
-
        * decl.c (finish_function): Check targetm.warn_func_return.
 
 2012-07-25  Jason Merrill  <jason@redhat.com>
 
 
   /* Core issue 226 (C++0x only): the following only applies to class
      templates.  */
-  if ((cxx_dialect == cxx98) || TREE_CODE (decl) != FUNCTION_DECL)
+  if (is_primary
+      && ((cxx_dialect == cxx98) || TREE_CODE (decl) != FUNCTION_DECL))
     {
       /* [temp.param]
 
                   TREE_PURPOSE (parm) = error_mark_node;
                   no_errors = false;
                 }
-             else if (is_primary
-                      && !is_partial
+             else if (!is_partial
                       && !is_friend_decl
                       /* Don't complain about an enclosing partial
                          specialization.  */
 
+2012-07-31  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/53624
+       * g++.dg/cpp0x/temp_default5.C: New.
+
 2012-07-30  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/51081
 
--- /dev/null
+// { dg-options "-std=c++11" }
+
+template <class Z = void, class T>
+void Foo(T)
+{
+  struct X {};
+}
+
+template <class T = int, typename U>
+void f(const U&)
+{
+  auto g = [] () {};
+}