summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/template6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/template6.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/template6.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template6.C b/gcc/testsuite/g++.old-deja/g++.jason/template6.C
new file mode 100644
index 000000000..2aec05c81
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/template6.C
@@ -0,0 +1,21 @@
+// { dg-do run }
+// PRMS Id: 4656
+// Testcase for use of member pointers in template resolution
+
+template <class T> class A {
+ public:
+ A() : a(1) {}
+ T a;
+};
+
+template <class T>
+int foo (T A<int>::*p)
+{
+ return 0;
+}
+int main()
+{
+ int A<int>::*pm = &A<int>::a; // { dg-bogus "" } failed temp resolution
+ foo (pm);
+ return 0;
+}