* gdb.cp/m-static.cc (keepalive): New function.

(gnu_obj_1::method): Use it.
This commit is contained in:
Tom Tromey 2012-06-19 15:47:02 +00:00
parent 422d65e705
commit e910f0b61f
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-06-19 Tom Tromey <tromey@redhat.com>
* gdb.cp/m-static.cc (keepalive): New function.
(gnu_obj_1::method): Use it.
2012-06-18 Doug Evans <dje@google.com>
* gdb.base/info-fun.exp: New file.

View File

@ -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;
}
};