diff options
Diffstat (limited to 'gdb/testsuite/gdb.python/py-value-cc.cc')
-rw-r--r-- | gdb/testsuite/gdb.python/py-value-cc.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-value-cc.cc b/gdb/testsuite/gdb.python/py-value-cc.cc index 59f1dec..ace957a 100644 --- a/gdb/testsuite/gdb.python/py-value-cc.cc +++ b/gdb/testsuite/gdb.python/py-value-cc.cc @@ -30,8 +30,21 @@ class B : public A { char a; }; +struct X +{ + union { int x; char y; }; + union { int a; char b; }; +}; + +union UU +{ + union { int x; char y; }; + union { int a; char b; }; +}; + typedef B Btd; typedef int *int_ptr; +typedef X Xtd; int func (const A &a) @@ -57,6 +70,16 @@ func (const A &a) U u; u.a = 99; + X x; + x.x = 101; + x.a = 102; + + UU uu; + uu.x = 1000; + + X *x_ptr = &x; + Xtd *xtd = &x; + return 0; /* Break here. */ } |