summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/gdb792.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.mi/gdb792.cc')
-rw-r--r--gdb/testsuite/gdb.mi/gdb792.cc59
1 files changed, 59 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/gdb792.cc b/gdb/testsuite/gdb.mi/gdb792.cc
new file mode 100644
index 00000000000..a698a12e0fb
--- /dev/null
+++ b/gdb/testsuite/gdb.mi/gdb792.cc
@@ -0,0 +1,59 @@
+#include <string.h>
+#include <stdio.h>
+
+class Q
+{
+ int v;
+ protected:
+ int qx;
+ int qy;
+ int w;
+};
+
+class B
+{
+ int k;
+ public:
+ int bx;
+ int by;
+};
+
+class A
+{
+ int u;
+
+ public:
+ A()
+ {
+ };
+ int x;
+ char buffer[10];
+
+ protected:
+ int y;
+ B b;
+
+ private:
+ float z;
+};
+
+class C : public A
+{
+ public:
+ C()
+ {
+ };
+ int zzzz;
+ private:
+ int ssss;
+};
+
+int main()
+{
+ A a;
+ C c;
+ Q q;
+ strcpy( a.buffer, "test" );
+ printf ( "%.10s\n", a.buffer );
+ return 0;
+}