gdb: fix invalid arg coercion when calling static member functions
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / method-call-in-c.cc
index 95f3f3c22de2db656c3b68a5fbe3a19b7607b27b..846a9111ef90751dfc0eebe01b2a2349b5a6483d 100644 (file)
@@ -35,9 +35,16 @@ struct foo_type
     return *this;
   }
 
+  static int static_method (float f, baz_type b)
+  {
+    return b.a + b.b + b.c + (int) f;
+  }
+
   int var = 120;
 };
 
+volatile int global_var;
+
 int
 main (void)
 {
@@ -48,5 +55,7 @@ main (void)
 
   foo += b;
 
+  global_var = foo.static_method (f, b);
+
   return foo.func (b, f);      /* Break here.  */
 }
This page took 0.026486 seconds and 4 git commands to generate.