summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C
new file mode 100644
index 000000000..1b64a6509
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C
@@ -0,0 +1,21 @@
+// { dg-do assemble }
+
+template <class T>
+class S
+{
+protected:
+ template <class U>
+ void f(U); // { dg-error "" } is protected
+
+private:
+ template <class U>
+ void g(U); // { dg-error "" } is private
+};
+
+
+void f()
+{
+ S<double> s;
+ s.f(3); // { dg-error "" } within this context
+ s.g(2.0); // { dg-error "" } within this context
+}