diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/casts.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/casts.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/casts.cc b/gdb/testsuite/gdb.cp/casts.cc index 543db89..ea4dc96 100644 --- a/gdb/testsuite/gdb.cp/casts.cc +++ b/gdb/testsuite/gdb.cp/casts.cc @@ -34,6 +34,20 @@ struct DoublyDerived : public VirtuallyDerived, { }; +struct Left +{ + int left; +}; + +struct Right +{ + int right; +}; + +struct LeftRight : public Left, public Right +{ +}; + int main (int argc, char **argv) { @@ -48,5 +62,11 @@ main (int argc, char **argv) Alpha *ad = &derived; Alpha *add = &doublyderived; + LeftRight gd; + gd.left = 23; + gd.right = 27; + unsigned long long gd_value = (unsigned long long) &gd; + unsigned long long r_value = (unsigned long long) (Right *) &gd; + return 0; /* breakpoint spot: casts.exp: 1 */ } |