summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-22 13:23:32 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-22 13:23:32 +0000
commit1d889f29dc584c7a88b0304c88515f61ea596c15 (patch)
treea707e26881caf1023846c1db55586d07793a5745 /gcc/testsuite/g++.old-deja
parenta0d52dee6fb09feb896b7dc4cff35a4fdbb66eaf (diff)
downloadgcc-1d889f29dc584c7a88b0304c88515f61ea596c15.tar.gz
* class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
the DECL_RESULTs of a member TEMPLATE_DECL, not just the TEMPLATE_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19376 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.old-deja')
-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 00000000000..e99103f40e6
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp74.C
@@ -0,0 +1,21 @@
+// Build don't link:
+
+template <class T>
+class S
+{
+protected:
+ template <class U>
+ void f(U); // ERROR - is protected
+
+private:
+ template <class U>
+ void g(U); // ERROR - is private
+};
+
+
+void f()
+{
+ S<double> s;
+ s.f(3); // ERROR - within this context
+ s.g(2.0); // ERROR - within this context
+}