From 7093c834d701edb312386d6953c47c50924a2628 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Mon, 14 Jul 2008 18:28:57 +0000 Subject: Fix for PR gdb/2477 --- gdb/testsuite/gdb.cp/class2.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gdb/testsuite/gdb.cp/class2.cc') 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 -- cgit v1.2.1