This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/17860] foreach loop fails -p4 if array slice is an expression


https://sourceware.org/bugzilla/show_bug.cgi?id=17860

--- Comment #1 from Jonathan Lebon <jlebon at redhat dot com> ---
The reason this fails is that the logic in c_tmpcounter::visit_foreach_loop()
is not exactly matched with c_unparser::visit_foreach_loop(). The order in
which tmpvars are declared is not the same as the order in which they are used
up during unparsing.

This doesn't cause an issue in the working case above since tmpcounter declares
and unparser uses 4 tmpvars in consecutive order. However, when i++ is used,
tmpcounter introduces two new vars for the post_crement, one of which it ends
up not declaring. When c_unparser then tries to use this same numbered tmpvar
we get the failures above.

Currently testing a patch for this.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]