]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/12007 (Multiple inheritance float pass by value fails)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 20 Feb 2004 23:10:33 +0000 (23:10 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 20 Feb 2004 23:10:33 +0000 (23:10 +0000)
PR c++/12007
* g++.dg/other/vthunk1.C: New test.

From-SVN: r78193

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/vthunk1.C [new file with mode: 0644]

index 1d75bac23446d2dc381b32cb9df7ea705f9bf1d9..ecf018c794f91a101f6e09300d4c35b9ef86e862 100644 (file)
@@ -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 (file)
index 0000000..9016562
--- /dev/null
@@ -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;
+}
This page took 0.101144 seconds and 5 git commands to generate.