2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51199
* g++.dg/template/pr51199.C: New.
From-SVN: r210321
+2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51199
+ * g++.dg/template/pr51199.C: New.
+
2014-05-11 Hans-Peter Nilsson <hp@bitrange.com>
* gcc.c-torture/execute/20101011-1.c [__MMIX__] (DO_TEST): Define as 0.
--- /dev/null
+// PR c++/51199
+
+typedef void FC() const;
+
+template<class T>
+struct add_ref {
+ typedef T& type; // { dg-error "forming reference" }
+};
+
+typedef add_ref<FC>::type ref_type;
+
+template<class T>
+struct add_ptr {
+ typedef T* type; // { dg-error "forming pointer" }
+};
+
+typedef add_ptr<FC>::type ptr_type;