summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-06-18 02:03:55 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-06-18 02:03:55 -0400
commit818bd4687c9c14e5ad9bdc3b1bf2572f26943929 (patch)
tree08700e1f69e16969405e63e45f78421252ef1955
parentb4675a903d6fe7c2e8aefb89a091b309e3dfe871 (diff)
popbug3
-rw-r--r--examples/popbug3.nl21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/popbug3.nl b/examples/popbug3.nl
new file mode 100644
index 0000000..5a8cd59
--- /dev/null
+++ b/examples/popbug3.nl
@@ -0,0 +1,21 @@
+/* This program makes B return multiple times, and each time
+ * the "7" is popped from the stack, causing the stack to become
+ * underfull
+ */
+
+ret: label = null;
+
+B() -> int32
+{
+ ret = back;
+ goto out;
+
+ @back:
+ return 20;
+}
+
+print 7 + B();
+
+@out:
+print "asdf";
+goto ret;