aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2004-02-20 23:10:33 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2004-02-20 23:10:33 +0000
commitecd116948f12859b820a22f570d4b56ea52f730a (patch)
tree45c4bc5249318449147207741b272a32d7ae9884 /gcc
parent7a3e01c4081a6977a86fb44fe0aff6dece8dc44e (diff)
downloadgcc-ecd116948f12859b820a22f570d4b56ea52f730a.zip
gcc-ecd116948f12859b820a22f570d4b56ea52f730a.tar.gz
gcc-ecd116948f12859b820a22f570d4b56ea52f730a.tar.bz2
re PR c++/12007 (Multiple inheritance float pass by value fails)
PR c++/12007 * g++.dg/other/vthunk1.C: New test. From-SVN: r78193
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/other/vthunk1.C26
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1d75bac..ecf018c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR c++/12007
+ * g++.dg/other/vthunk1.C: New test.
+
2004-02-20 Falk Hueffner <falk@debian.org>
PR target/14201
diff --git a/gcc/testsuite/g++.dg/other/vthunk1.C b/gcc/testsuite/g++.dg/other/vthunk1.C
new file mode 100644
index 0000000..9016562
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/vthunk1.C
@@ -0,0 +1,26 @@
+// PR c++/12007 Multiple inheritance float pass by value fails
+// { dg-do run }
+
+extern "C" void abort (void);
+
+class gvImpl
+{
+public:
+ virtual void PutVal(float value){}
+};
+
+class foo { public: virtual void Bar(){} };
+
+class myGv: public foo, public gvImpl
+{
+ void PutVal(float value){ if (value != 3.14159f) abort (); }
+};
+
+myGv x;
+gvImpl* object = &x;
+
+int main()
+{
+ object->PutVal(3.14159f);
+ return 0;
+}