mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
* gdb.c++/casts.cc, gdb.c++/casts.exp: New test.
This commit is contained in:
20
gdb/testsuite/gdb.c++/casts.cc
Normal file
20
gdb/testsuite/gdb.c++/casts.cc
Normal file
@ -0,0 +1,20 @@
|
||||
struct A
|
||||
{
|
||||
int a;
|
||||
A (int aa): a (aa) {}
|
||||
};
|
||||
|
||||
struct B: public A
|
||||
{
|
||||
int b;
|
||||
B (int aa, int bb): A (aa), b(bb) {}
|
||||
};
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
A *a = new B(42, 1729);
|
||||
B *b = (B *) a;
|
||||
|
||||
return 0; /* breakpoint spot: casts.exp: 1 */
|
||||
}
|
Reference in New Issue
Block a user