From ecd116948f12859b820a22f570d4b56ea52f730a Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Fri, 20 Feb 2004 23:10:33 +0000 Subject: [PATCH] re PR c++/12007 (Multiple inheritance float pass by value fails) PR c++/12007 * g++.dg/other/vthunk1.C: New test. From-SVN: r78193 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/other/vthunk1.C | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 gcc/testsuite/g++.dg/other/vthunk1.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1d75bac2344..ecf018c794f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-02-20 John David Anglin + + PR c++/12007 + * g++.dg/other/vthunk1.C: New test. + 2004-02-20 Falk Hueffner 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 00000000000..90165628b45 --- /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; +} -- 2.30.2