summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2008-05-21 09:22:17 -0400
committerStan Cox <scox@redhat.com>2008-05-21 09:22:17 -0400
commitfcc7aafa64338bdbac356dd509acd20f35563ef5 (patch)
tree452151d41b4978bde87eb133018737821e4c9aec /testsuite
parentaa215f04d4546c5c810d7accde3ad108e855f397 (diff)
downloadsystemtap-steved-fcc7aafa64338bdbac356dd509acd20f35563ef5.tar.gz
systemtap-steved-fcc7aafa64338bdbac356dd509acd20f35563ef5.tar.xz
systemtap-steved-fcc7aafa64338bdbac356dd509acd20f35563ef5.zip
Optimize compound and binary expression assignments.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ChangeLog6
-rw-r--r--testsuite/systemtap.base/optim_arridx.exp2
-rw-r--r--testsuite/systemtap.base/optim_arridx.stp6
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 3c74b83d..a576550e 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-21 Stan Cox <scox@redhat.com>
+
+ * systemtap.base/optim_arridx.stp: Test compound assignment and
+ binary expression.
+ * systemtap.base/optim_arridx.exp: Likewise.
+
2008-05-21 Mark Wielaard <mwielaard@redhat.com>
* buildok/aux_syscalls-embedded.stp: Don't check _struct_utimbuf_u
diff --git a/testsuite/systemtap.base/optim_arridx.exp b/testsuite/systemtap.base/optim_arridx.exp
index 447ad1f4..b7c5c360 100644
--- a/testsuite/systemtap.base/optim_arridx.exp
+++ b/testsuite/systemtap.base/optim_arridx.exp
@@ -45,6 +45,8 @@ for (1; (bb) < (10); (bb)++) (cc) += (bb)
for ((dd) = (1); (dd) < (10); 1) (dd) += (1)
if (1) (ee) = (1)
+(cc) = ((dd) = (5))
+(cc) = ((4) + ((cc) = (1)))
printf("%d %d %d %d %d", aa, bb, cc, dd, ee)
exit()
}
diff --git a/testsuite/systemtap.base/optim_arridx.stp b/testsuite/systemtap.base/optim_arridx.stp
index 4551bb3e..20710c7f 100644
--- a/testsuite/systemtap.base/optim_arridx.stp
+++ b/testsuite/systemtap.base/optim_arridx.stp
@@ -34,6 +34,12 @@ probe begin {
if (elide_global_b = 1)
ee = 1
+ // compound assignment
+ cc = elide_gg=dd=5
+
+ // binary expression
+ cc = ((elide_hh = 4) + (cc = 1))
+
printf("%d %d %d %d %d", aa, bb, cc, dd, ee)
exit ()
}