mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
2002-12-11 David Carlton <carlton@math.stanford.edu>
* gdb.c++/m-data.exp: Add test for members that shadow global variables: see PR gdb/804. * gdb.c++/m-data.cc: Ditto.
This commit is contained in:
@ -41,7 +41,18 @@ namespace __gnu_test
|
||||
public:
|
||||
gnu_obj_3(antiquities b): data(etruscan) { }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
int shadow = 0;
|
||||
|
||||
class C
|
||||
{
|
||||
public:
|
||||
C (int x) : shadow (x) {}
|
||||
void marker () {}
|
||||
private:
|
||||
int shadow;
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
@ -49,5 +60,9 @@ int main()
|
||||
gnu_obj_1 test1(egyptian, 4589);
|
||||
gnu_obj_2<long> test2(roman);
|
||||
gnu_obj_3<long> test3(greek);
|
||||
|
||||
C theC (1); // breakpoint: first-constructs-done
|
||||
theC.marker ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user