This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/17860] New: foreach loop fails -p4 if array slice is an expression
- From: "jlebon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 19 Jan 2015 16:18:28 +0000
- Subject: [Bug translator/17860] New: foreach loop fails -p4 if array slice is an expression
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17860
Bug ID: 17860
Summary: foreach loop fails -p4 if array slice is an expression
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: jlebon at redhat dot com
The following script runs successfully:
global arr
probe oneshot {
i = 1
arr[1] = 2
foreach (var in arr[i] limit 1) {
println("iterating")
}
}
But if we change the subscript of arr to arr[i++] in the foreach statement, we
get the following p4 failures:
/tmp/stappEHxIa/stap_b1cc5d80db2fc511db3feaaaf7d971a3_1314_src.c: In function
âprobe_2463â:
/tmp/stappEHxIa/stap_b1cc5d80db2fc511db3feaaaf7d971a3_1314_src.c:205:6: error:
âstruct probe_2463_localsâ has no member named â__tmp8â
l->__tmp8 = 0LL;
^
/tmp/stappEHxIa/stap_b1cc5d80db2fc511db3feaaaf7d971a3_1314_src.c:221:12: error:
âstruct probe_2463_localsâ has no member named â__tmp8â
if (l->__tmp8++ >= l->__tmp7) goto break_0;
^
make[1]: *** [/tmp/stappEHxIa/stap_b1cc5d80db2fc511db3feaaaf7d971a3_1314_src.o]
Error 1
--
You are receiving this mail because:
You are the assignee for the bug.