summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/ns18.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.ns/ns18.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/ns18.C30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/ns18.C b/gcc/testsuite/g++.old-deja/g++.ns/ns18.C
new file mode 100644
index 000000000..192fa4291
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.ns/ns18.C
@@ -0,0 +1,30 @@
+// { dg-do assemble }
+// Origin: Theo Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
+
+namespace Bname {
+ class B;
+}
+
+template <class T>
+class A {
+ friend class Bname::B;
+ static const int a = 1;
+public:
+ A() { }
+};
+
+namespace Bname {
+ class B {
+ int a;
+ public:
+ template<class T>
+ B(const T&):a(T::a) { }
+ };
+}
+
+int
+main()
+{
+ A<int> a;
+ Bname::B b(a);
+}