summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/pr10687.cc
diff options
context:
space:
mode:
authorcmoller <cmoller>2010-04-20 20:22:09 +0000
committercmoller <cmoller>2010-04-20 20:22:09 +0000
commit78c144e8c3ae7bb36d632f6bfaaaad9c97199ce6 (patch)
treeeebdcaa17f71b72985fb2fa1f73243f544e2a7f4 /gdb/testsuite/gdb.cp/pr10687.cc
parenta5100fac1feb40667d8417391a427ae61487b4ee (diff)
downloadgdb-78c144e8c3ae7bb36d632f6bfaaaad9c97199ce6.tar.gz
PR 10867
* cp-valprint.c (global): Adding new static array recursion detection obstack. (cp_print_value_fields, cp_print_static_field): Added new static array recursion detection code. * gdb.cp/Makefile.in (EXECUTABLES): Added pr10687 * gdb.cp/pr10687.cc: New file. * gdb.cp/pr10687.exp: New file
Diffstat (limited to 'gdb/testsuite/gdb.cp/pr10687.cc')
-rw-r--r--gdb/testsuite/gdb.cp/pr10687.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/pr10687.cc b/gdb/testsuite/gdb.cp/pr10687.cc
new file mode 100644
index 00000000000..bc25dccff57
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/pr10687.cc
@@ -0,0 +1,24 @@
+class vec2
+{
+ public:
+ vec2() { _v[0] = _v[1] = 0; }
+ vec2(int x, int y) { _v[0] = x; _v[1] = y; }
+ static vec2 axis[2];
+ static vec2 axis6[6];
+ private:
+ int _v[2];
+};
+
+vec2 vec2::axis[2] = { vec2(1,0), vec2(0,1) };
+vec2 vec2::axis6[6] = {
+ vec2(1,0), vec2(0,1),
+ vec2(2,0), vec2(0,2),
+ vec2(3,0), vec2(0,3)
+};
+
+int main(int argc, char*argv[])
+{
+ vec2 a;
+
+ return 0; // marker
+}