diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/overload.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/overload.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/overload.cc b/gdb/testsuite/gdb.cp/overload.cc index dc117fb..bd2f96c 100644 --- a/gdb/testsuite/gdb.cp/overload.cc +++ b/gdb/testsuite/gdb.cp/overload.cc @@ -89,6 +89,14 @@ namespace XXX { void marker2() {} } +class A {}; +class B: public A {}; +class C: public B {}; +class D: C {}; + +int bar (A) { return 11; } +int bar (B) { return 22; } + int main () { char arg2 = 2; @@ -105,6 +113,15 @@ int main () int arg13 = 200.0; char arg14 = 'a'; + A a; + B b; + C c; + D d; + + bar (a); + bar (b); + bar (c); + char *str = (char *) "A"; foo foo_instance1(111); foo foo_instance2(222, str); @@ -132,6 +149,7 @@ int main () marker1(); // marker1-returns-here XXX::marker2(); // marker1-returns-here + return 0; } |