aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Smith <richard@ex-parrot.com>2002-02-13 20:59:37 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-02-13 20:59:37 +0000
commit658311e053abebc6fa24f2863d81e802e776057e (patch)
tree37b45b0808296350445dc50181023c68a9244bb3
parent8dba028f108fa3e61c531ae2eb9e952c685301b8 (diff)
downloadgcc-658311e053abebc6fa24f2863d81e802e776057e.zip
gcc-658311e053abebc6fa24f2863d81e802e776057e.tar.gz
gcc-658311e053abebc6fa24f2863d81e802e776057e.tar.bz2
* g++.old-deja/g++.other/thunk1.C: New test.
From-SVN: r49743
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/thunk1.C35
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dd61046..56bd978 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-13 Richard Smith <richard@ex-parrot.com>
+
+ * g++.old-deja/g++.other/thunk1.C: New test.
+
2002-02-12 David Billinghurst <David.Billinghurst@riotinto.com>
* g++.dg/warn/weak1.C: weak attributes not supported on cygwin
diff --git a/gcc/testsuite/g++.old-deja/g++.other/thunk1.C b/gcc/testsuite/g++.old-deja/g++.other/thunk1.C
new file mode 100644
index 0000000..72ca2ce
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/thunk1.C
@@ -0,0 +1,35 @@
+extern "C" void abort();
+
+int ic;
+
+struct X
+{
+ X() { ++ic; }
+ X( const X & ) { ++ic; }
+ ~X() { if (--ic < 0) abort(); }
+};
+
+struct V
+{
+ virtual ~V() {}
+};
+
+struct A : public virtual V
+{
+};
+
+struct B : public virtual V
+{
+ virtual void foo( X ) = 0;
+};
+
+struct D : public A, public virtual B
+{
+ virtual void foo( X ) {}
+};
+
+int main()
+{
+ B *b = new D;
+ b->foo( X() );
+}