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.
31 lines
305 B
C++
31 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;
|
|
}
|