aboutsummaryrefslogtreecommitdiff
path: root/ld/cdtest-func.cc
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1992-08-05 04:15:37 +0000
committerPer Bothner <per@bothner.com>1992-08-05 04:15:37 +0000
commit917bffa7f6dd3a04195a790595a2088683386227 (patch)
treefb5e23a8c1dcef367ae67cc63fed7ea9b45fe0f2 /ld/cdtest-func.cc
parentc7a535938ed0ac4a601897462e0012ed7b2430e1 (diff)
downloadgdb-917bffa7f6dd3a04195a790595a2088683386227.zip
gdb-917bffa7f6dd3a04195a790595a2088683386227.tar.gz
gdb-917bffa7f6dd3a04195a790595a2088683386227.tar.bz2
* cdtest-main.cc, cdtest-func.cc, cdtest-foo.h, cdtest-foo.cc,
cdtest.exp: A test program (copied from libg++/test-install) that tests that constructor and destructors are handled corrrectly.
Diffstat (limited to 'ld/cdtest-func.cc')
-rw-r--r--ld/cdtest-func.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/cdtest-func.cc b/ld/cdtest-func.cc
new file mode 100644
index 0000000..79000e3
--- /dev/null
+++ b/ld/cdtest-func.cc
@@ -0,0 +1,17 @@
+// test program for Class Foo
+
+#include "cdtest-foo.h"
+
+static Foo static_foo( "static_foo");
+
+Foo f()
+{
+ Foo x;
+ return x;
+}
+
+void g()
+{
+ Foo other_foo1 = Foo( "other_foo1"), other_foo2 = Foo( "other_foo2");
+ other_foo2 = other_foo1;
+}