summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/optimize.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok/optimize.stp')
-rwxr-xr-xtestsuite/semok/optimize.stp18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/semok/optimize.stp b/testsuite/semok/optimize.stp
new file mode 100755
index 00000000..28ccb46c
--- /dev/null
+++ b/testsuite/semok/optimize.stp
@@ -0,0 +1,18 @@
+#! stap -p2
+
+# We count on the optimizer to blow away these ridiculous
+# expressions, since they have no effect on the output.
+
+global b
+
+function zoo (x) {
+ return "tada" + x
+}
+
+probe begin {
+ b <<< "hello"
+ a = b + 2
+ zoo (zoo (5))
+ b = "goodbye"
+ no . $such . $target + $variable
+}