This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add PR c++/11814 test case to testsuite


Hi Jason,

Your recent fix for PR c++/10200 seems to have fixed this longstanding
PR too.  Should I add its test case to the testsuite and close the PR?

gcc/testsuite/ChangeLog:

	PR c++/11814
	* g++.dg/lookup/template4.C: New test.
---
 gcc/testsuite/g++.dg/lookup/template4.C | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/lookup/template4.C

diff --git a/gcc/testsuite/g++.dg/lookup/template4.C b/gcc/testsuite/g++.dg/lookup/template4.C
new file mode 100644
index 0000000..53030d6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/template4.C
@@ -0,0 +1,16 @@
+// PR c++/11814
+
+template <typename> struct A
+{
+    template <typename> void foo();
+};
+
+template <typename T> struct B
+{
+    template <typename> void foo()
+    {
+        A<T>* p;
+        p->foo<int>();  // { dg-error "" }
+    }
+};
+
-- 
2.7.1.257.g925a48d


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]