summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/inherit2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/inherit2.C')
-rw-r--r--gcc/testsuite/g++.dg/template/inherit2.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/inherit2.C b/gcc/testsuite/g++.dg/template/inherit2.C
new file mode 100644
index 000000000..4fd7ec063
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/inherit2.C
@@ -0,0 +1,19 @@
+// PR c++/5658
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Theodore.Papadopoulo 11 Feb 2002 <Theodore.Papadopoulo@sophia.inria.fr>
+
+struct A {
+ typedef int iterator;
+};
+template <typename T>
+struct B: public A {
+ template <typename U>
+ struct iterator {
+ };
+ B() { }
+};
+int main()
+{
+ B<int> a;
+}