aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/crash40.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/crash40.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash40.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash40.C b/gcc/testsuite/g++.old-deja/g++.other/crash40.C
new file mode 100644
index 00000000000..3af3f731a66
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash40.C
@@ -0,0 +1,19 @@
+// Build don't link:
+// Copyright (C) 2001 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 11 April 2001 <nathan@codesourcery.com>
+// Origin: Theo Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
+
+// Bug 1917. We were considering thunks to clones to be clones. and
+// hence getting confused.
+
+struct A { virtual ~A(); };
+struct B { virtual ~B(); };
+
+struct C: public A,B {};
+
+template <class TYPE>
+inline TYPE
+sqr(const TYPE& x) {
+ return 1;
+}
+int f(const int t) { return sqr(t); }