From: Daniel Jacobowitz Date: Fri, 5 May 2006 18:04:09 +0000 (+0000) Subject: * gdb.cp/m-static.h (class gnu_obj_4): Add dummy member. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c7e64c9a767deaad6e7d20cf0e691bd11b5686a4;p=binutils-gdb.git * gdb.cp/m-static.h (class gnu_obj_4): Add dummy member. * gdb.cp/m-static.cc (main): Write to test4.dummy, so that test4 is allocated by the compiler. * gdb.mi/var-cmd.c: (do_special_tests): Write to u, anonu, s, anons, e, anone to force their allocation by the compiler. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bbc2f3692f9..e2455112900 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,12 @@ -2006-05-04 Daniel Jacobowitz +2006-05-05 Christophe Lyon + + * gdb.cp/m-static.h (class gnu_obj_4): Add dummy member. + * gdb.cp/m-static.cc (main): Write to test4.dummy, so that test4 + is allocated by the compiler. + * gdb.mi/var-cmd.c: (do_special_tests): Write to u, anonu, s, + anons, e, anone to force their allocation by the compiler. + +2006-05-05 Daniel Jacobowitz * gdb.base/help.exp: Update expected text for help d and help delete. diff --git a/gdb/testsuite/gdb.cp/m-static.cc b/gdb/testsuite/gdb.cp/m-static.cc index 6d08cb063ea..9dae5ee81d7 100644 --- a/gdb/testsuite/gdb.cp/m-static.cc +++ b/gdb/testsuite/gdb.cp/m-static.cc @@ -68,5 +68,6 @@ int main() gnu_obj_3 test3(greek); gnu_obj_4 test4; - return 0; // breakpoint: constructs-done + test4.dummy = 0; + return test4.dummy; // breakpoint: constructs-done } diff --git a/gdb/testsuite/gdb.cp/m-static.h b/gdb/testsuite/gdb.cp/m-static.h index 137d3b75c50..012cd770e47 100644 --- a/gdb/testsuite/gdb.cp/m-static.h +++ b/gdb/testsuite/gdb.cp/m-static.h @@ -7,5 +7,8 @@ class gnu_obj_4 static const int nowhere; // At some point, perhaps: // static const int everywhere = 317; + + // try to ensure test4 is actually allocated + int dummy; }; diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c index 2a297d2c02d..4ccd570cb91 100644 --- a/gdb/testsuite/gdb.mi/var-cmd.c +++ b/gdb/testsuite/gdb.mi/var-cmd.c @@ -301,6 +301,12 @@ do_special_tests (void) int a; a = 1; + u.integer = a; + anonu.a = a; + s.integer = a; + anons.a = a; + e = bar; + anone = A; incr_a(2); }