old-cross-binutils/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.cc
Jan Kratochvil 5c07461a74 gdb/testsuite/
* 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.
2011-08-26 21:11:08 +00:00

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;
}