diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2008-07-14 18:28:57 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2008-07-14 18:28:57 +0000 |
commit | 7093c834d701edb312386d6953c47c50924a2628 (patch) | |
tree | 55141ad44cc3308fbd2546024b55d1da61ea8db1 /gdb/testsuite/gdb.cp/class2.cc | |
parent | 5651477109e89a1a78c5c28cfac55c6141000754 (diff) | |
download | binutils-gdb-7093c834d701edb312386d6953c47c50924a2628.tar.gz |
Fix for PR gdb/2477
Diffstat (limited to 'gdb/testsuite/gdb.cp/class2.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/class2.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.cp/class2.cc b/gdb/testsuite/gdb.cp/class2.cc index 8aba5c311f6..9a3430984dd 100644 --- a/gdb/testsuite/gdb.cp/class2.cc +++ b/gdb/testsuite/gdb.cp/class2.cc @@ -41,6 +41,12 @@ B::~B() b2 = 902; } +struct C : public B +{ + A *c1; + A *c2; +}; + // Stop the compiler from optimizing away data. void refer (A *) { @@ -57,16 +63,19 @@ void refer (empty *) int main (void) { - A alpha, *aap, *abp; + A alpha, *aap, *abp, *acp; B beta, *bbp; + C gamma; empty e; alpha.a1 = 100; beta.a1 = 200; beta.b1 = 201; beta.b2 = 202; + gamma.c1 = 0; gamma.c2 = (A *) ~0UL; aap = α refer (aap); abp = β refer (abp); bbp = β refer (bbp); + acp = γ refer (acp); refer (&e); return 0; // marker return 0 |