summaryrefslogtreecommitdiffstats
path: root/testsuite/transok
diff options
context:
space:
mode:
authorfche <fche>2005-06-05 16:35:28 +0000
committerfche <fche>2005-06-05 16:35:28 +0000
commitf3c26ea55e2f2c1d222312bf75035359c439ed21 (patch)
tree1a58dfcdebe04941002e7e0203f765b619ca9c67 /testsuite/transok
parent8846477c222cdae649b02117cc96999b0be6ad40 (diff)
downloadsystemtap-steved-f3c26ea55e2f2c1d222312bf75035359c439ed21.tar.gz
systemtap-steved-f3c26ea55e2f2c1d222312bf75035359c439ed21.tar.xz
systemtap-steved-f3c26ea55e2f2c1d222312bf75035359c439ed21.zip
2005-06-05 Frank Ch. Eigler <fche@elastic.org>
Implement for/next/continue/break/while statements. * staptree.h: Declare new 0-arity statement types. Tweak for_loop. * parse.cxx: Parse them all. * translate.cxx (c_unparser): Maintain break/continue label stack. (visit_for_loop, *_statement): New implementations. * elaborate.*, staptree.cxx: Mechanical changes. * testsuite/parseok/ten.stp, semko/twelve.stp, transko/two.stp, transok/five.stp: New tests.
Diffstat (limited to 'testsuite/transok')
-rwxr-xr-xtestsuite/transok/five.stp17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/transok/five.stp b/testsuite/transok/five.stp
new file mode 100755
index 00000000..266b3408
--- /dev/null
+++ b/testsuite/transok/five.stp
@@ -0,0 +1,17 @@
+#! stap
+
+probe two
+{
+ for (;;) ;
+ for (a=0;;) { if (a > 4) break }
+ for (;a>0;) { a + 5 }
+ for (;;a=a+1) { a + 5 }
+ for (a=0;a>0;) { if (a < 4) continue }
+ for (;a>0;a=a+1) { a + 5 }
+ for (a=0;;a=a+1) { a + 5 }
+ for (a=0; a<=4; a=a+1) ;
+ for (a=0; a<=4; a=a+1) { b = a }
+
+ while (99) next
+ while (99) {}
+}