[Bug translator/17860] foreach loop fails -p4 if array slice is an expression
jlebon at redhat dot com
sourceware-bugzilla@sourceware.org
Mon Jan 19 16:21:00 GMT 2015
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.
More information about the Systemtap
mailing list