From: Tom Tromey Date: Tue, 19 Jun 2012 15:47:02 +0000 (+0000) Subject: * gdb.cp/m-static.cc (keepalive): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e910f0b61f40b0fcbbba3607dbe3e153f45e00d4;p=binutils-gdb.git * gdb.cp/m-static.cc (keepalive): New function. (gnu_obj_1::method): Use it. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 595ff6635dd..26e4ce0f6c8 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-06-19 Tom Tromey + + * gdb.cp/m-static.cc (keepalive): New function. + (gnu_obj_1::method): Use it. + 2012-06-18 Doug Evans * gdb.base/info-fun.exp: New file. diff --git a/gdb/testsuite/gdb.cp/m-static.cc b/gdb/testsuite/gdb.cp/m-static.cc index 7f997efa964..e9dce18c68e 100644 --- a/gdb/testsuite/gdb.cp/m-static.cc +++ b/gdb/testsuite/gdb.cp/m-static.cc @@ -2,6 +2,8 @@ enum region { oriental, egyptian, greek, etruscan, roman }; +void keepalive(bool *var) { } + // Test one. class gnu_obj_1 { @@ -19,6 +21,7 @@ public: long method () { static bool svar = true; + keepalive (&svar); return key2; } };