aboutsummaryrefslogtreecommitdiff
path: root/libgloss/mips/dtor.C
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/mips/dtor.C')
-rw-r--r--libgloss/mips/dtor.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/libgloss/mips/dtor.C b/libgloss/mips/dtor.C
new file mode 100644
index 0000000..2cfcb46
--- /dev/null
+++ b/libgloss/mips/dtor.C
@@ -0,0 +1,25 @@
+#include <stdio.h>
+
+extern "C" void print (char *, ...);
+
+class foo
+{
+public:
+ foo () { print ("ctor\n"); }
+ ~foo () { print ("dtor\n"); }
+};
+
+foo x;
+
+main ()
+{
+ outbyte ('&');
+ outbyte ('@');
+ outbyte ('$');
+ outbyte ('%');
+ print ("FooBar\r\n");
+
+ /* whew, we made it */
+ print ("\r\nDone...\r\n");
+ fflush(stdout);
+}