aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/using2.C
diff options
context:
space:
mode:
author(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-13 02:39:05 +0000
committer(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-13 02:39:05 +0000
commit2a6548e7176f46a32f6b9e20b6f63fba38010605 (patch)
treebe6d723751681c540c471c7be223d19499cfd280 /gcc/testsuite/g++.dg/template/using2.C
parent780b7d9b87ddf306aa31c750d5eb9d96a9cb69ea (diff)
This commit was manufactured by cvs2svn to create tagobjc-improvements-candidate-20030915
'objc-improvements-candidate-20030915'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/objc-improvements-candidate-20030915@71359 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/template/using2.C')
-rw-r--r--gcc/testsuite/g++.dg/template/using2.C30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/using2.C b/gcc/testsuite/g++.dg/template/using2.C
new file mode 100644
index 00000000000..87cdbc18657
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using2.C
@@ -0,0 +1,30 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 Jul 2003 <nathan@codesourcery.com>
+
+// PR 9447. Using decls in template classes.
+
+template <class T>
+struct Foo {
+ int i; // { dg-error "" "" }
+};
+
+struct Baz
+{
+ int i; // { dg-error "" "" }
+};
+
+template <class T>
+struct Bar : public Foo<T>, Baz {
+ using Foo<T>::i;
+ using Baz::i;
+
+ int foo () { return i; } // { dg-error "request for member" "" }
+};
+
+void foo (Bar<int> &bar)
+{
+ bar.foo(); // { dg-error "instantiated" "" }
+}
+