@@ -1300,7 +1300,8 @@ write_prefix (const tree node)
MANGLE_TRACE_TREE ("prefix", node);
- if (TREE_CODE (node) == DECLTYPE_TYPE)
+ if (TREE_CODE (node) == DECLTYPE_TYPE
+ || TREE_CODE (node) == TRAIT_TYPE)
{
write_type (node);
return;
new file mode 100644
@@ -0,0 +1,16 @@
+// PR c++/116052
+// { dg-do compile { target c++11 } }
+
+template <class T> using decay_t = __decay(T);
+template <class T> void g(typename decay_t<T>::foo); // { dg-error "built-in" }
+template <class T> void f()
+{
+ g<T>(0);
+}
+
+struct A { using foo = int; };
+
+int main()
+{
+ f<A>();
+}