mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
* gdb.cp/m-static.cc (keepalive): New function.
(gnu_obj_1::method): Use it.
This commit is contained in:
parent
422d65e705
commit
e910f0b61f
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user