+2013-04-22 Jason Merrill <jason@redhat.com>
+
+ * mangle.c (write_type): Mangle decltype(auto).
+
2013-04-19 Jason Merrill <jason@redhat.com>
N3638 changes to return type deduction
case TEMPLATE_TYPE_PARM:
if (is_auto (type))
{
- write_identifier ("Da");
+ if (AUTO_IS_DECLTYPE (type))
+ write_identifier ("Dc");
+ else
+ write_identifier ("Da");
++is_builtin_type;
break;
}
--- /dev/null
+// Mangling for decltype(auto)
+// { dg-options "-std=c++1y" }
+
+void f();
+
+// { dg-final { scan-assembler "_Z2g1IiEDcv" } }
+template <class T> decltype(auto) g1() { return &f; }
+template decltype(auto) g1<int>();
+
+// { dg-final { scan-assembler "_Z2g2IiEDav" } }
+template <class T> auto g2() { return &f; }
+template auto g2<int>();