PR c++/53651
* name-lookup.c (constructor_name_p): Don't try to look at the
name of a DECLTYPE_TYPE.
From-SVN: r188807
+2012-06-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/53651
+ * name-lookup.c (constructor_name_p): Don't try to look at the
+ name of a DECLTYPE_TYPE.
+
2012-06-18 Lawrence Crowl <crowl@google.com>
* decl2.c (cp_write_global_declarations): Rename use of TV_PHASE_CGRAPH
if (TREE_CODE (name) != IDENTIFIER_NODE)
return false;
+ /* These don't have names. */
+ if (TREE_CODE (type) == DECLTYPE_TYPE
+ || TREE_CODE (type) == TYPEOF_TYPE)
+ return false;
+
ctor_name = constructor_name_full (type);
if (name == ctor_name)
return true;
+2012-06-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/53651
+ * g++.dg/cpp0x/decltype37.C: New.
+
2012-06-19 Kaz Kojima <kkojima@gcc.gnu.org>
* gcc.dg/stack-usage-1.c: Use sh*-*-* instead of sh-*-*.
--- /dev/null
+// PR c++/53651
+// { dg-do compile { target c++11 } }
+
+template<typename> struct wrap { void bar(); };
+
+template<typename T> auto foo(T* t) -> wrap<T>* { return 0; }
+
+template<typename T>
+struct holder : decltype(*foo((T*)0)) // { dg-error "class type" }
+{
+ using decltype(*foo((T*)0))::bar; // { dg-error "is not a base" }
+};
+
+holder<int> h;