diff options
-rw-r--r-- | staptree.cxx | 14 | ||||
-rw-r--r-- | testsuite/systemtap.base/global_end.exp | 3 | ||||
-rw-r--r-- | testsuite/systemtap.base/global_end.stp | 4 |
3 files changed, 13 insertions, 8 deletions
diff --git a/staptree.cxx b/staptree.cxx index 4c3b3090..7a335fc3 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -1897,19 +1897,21 @@ varuse_collecting_visitor::visit_arrayindex (arrayindex *e) void varuse_collecting_visitor::visit_pre_crement (pre_crement *e) { - expression* last_lrvalue = current_lrvalue; - current_lrvalue = e->operand; // leave a mark for ::visit_symbol + // PR6954: regard as pure writes + expression* last_lvalue = current_lvalue; + current_lvalue = e->operand; // leave a mark for ::visit_symbol functioncall_traversing_visitor::visit_pre_crement (e); - current_lrvalue = last_lrvalue; + current_lvalue = last_lvalue; } void varuse_collecting_visitor::visit_post_crement (post_crement *e) { - expression* last_lrvalue = current_lrvalue; - current_lrvalue = e->operand; // leave a mark for ::visit_symbol + // PR6954: regard as pure writes + expression* last_lvalue = current_lvalue; + current_lvalue = e->operand; // leave a mark for ::visit_symbol functioncall_traversing_visitor::visit_post_crement (e); - current_lrvalue = last_lrvalue; + current_lvalue = last_lvalue; } void diff --git a/testsuite/systemtap.base/global_end.exp b/testsuite/systemtap.base/global_end.exp index d245212f..9d9c8d9b 100644 --- a/testsuite/systemtap.base/global_end.exp +++ b/testsuite/systemtap.base/global_end.exp @@ -19,6 +19,7 @@ expect { -re {epsilon."one",1. @count=0x4 @min=0x1 @max=0x4 @sum=0xa @avg=0x2} { incr ok; exp_continue } -re {epsilon."two",2. @count=0x4 @min=0xa @max=0x28 @sum=0x64 @avg=0x19} { incr ok; exp_continue } -re {phi @count=0x4 @min=0x1 @max=0x4 @sum=0xa @avg=0x2} { incr ok; exp_continue } + -re {var=0x1} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } @@ -32,4 +33,4 @@ expect { -re {Avg time = [1-9]} { incr ok; exp_continue } } -if {$ok == 12} { pass "$test ($ok)" } { fail "$test ($ok)" } +if {$ok == 13} { pass "$test ($ok)" } { fail "$test ($ok)" } diff --git a/testsuite/systemtap.base/global_end.stp b/testsuite/systemtap.base/global_end.stp index 4a5baff7..1f707d54 100644 --- a/testsuite/systemtap.base/global_end.stp +++ b/testsuite/systemtap.base/global_end.stp @@ -1,4 +1,4 @@ -global alpha, beta, gamma, iota, epsilon, phi +global alpha, beta, gamma, iota, epsilon, phi, var probe begin { gamma = "abcdefghijklmnopqrstuvwxyz" @@ -29,6 +29,8 @@ probe begin { epsilon["two",2] <<< 20 epsilon["two",2] <<< 30 epsilon["two",2] <<< 40 + + var++ } probe timer.ms(100) { |