summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/optimize.stp
blob: bcf8ac04f101d87ad5d059b81bfddc3fe9a8931f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! 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
}

# bug #2599
probe begin{for(i=1;i-=2;i++);}
probe begin{while(i+=2);}
probe begin{if(i=j);}