summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash34.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash34.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash34.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash34.C b/gcc/testsuite/g++.old-deja/g++.pt/crash34.C
new file mode 100644
index 000000000..31f89c8cc
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash34.C
@@ -0,0 +1,20 @@
+// { dg-do assemble }
+// Origin: Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
+
+template <class T>
+class A {
+public:
+ class B { };
+ class C: public B {
+ public:
+ C(A&):B() { }
+ };
+ C f() { return C(*this); }
+};
+
+int
+main()
+{
+ A<int> a;
+ a.f();
+}