mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-28 12:33:36 +08:00
5c07461a74
* gdb.mi/mi-inheritance-syntax-error.cc (A): Make `a' public. (C): Initialize `a'. * gdb.mi/mi-inheritance-syntax-error.exp (-data-evaluate-expression $path): Expect `a' as 5.
32 lines
305 B
C++
32 lines
305 B
C++
// Test for -var-info-path-expression syntax error
|
|
// caused by PR 11912
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
class A
|
|
{
|
|
public:
|
|
int a;
|
|
};
|
|
|
|
class C : public A
|
|
{
|
|
public:
|
|
C()
|
|
{
|
|
a = 5;
|
|
};
|
|
void testLocation()
|
|
{
|
|
z = 1;
|
|
};
|
|
int z;
|
|
};
|
|
|
|
int main()
|
|
{
|
|
C c;
|
|
c.testLocation();
|
|
return 0;
|
|
}
|