From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2285 invoked by alias); 19 Jan 2015 16:18:39 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 2250 invoked by uid 48); 19 Jan 2015 16:18:32 -0000 From: "jlebon at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/17860] New: foreach loop fails -p4 if array slice is an expression Date: Mon, 19 Jan 2015 16:18:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jlebon at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00031.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D17860 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 =3D 1 arr[1] =3D 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 functi= on =E2=80=98probe_2463=E2=80=99: /tmp/stappEHxIa/stap_b1cc5d80db2fc511db3feaaaf7d971a3_1314_src.c:205:6: err= or: =E2=80=98struct probe_2463_locals=E2=80=99 has no member named =E2=80=98__t= mp8=E2=80=99 l->__tmp8 =3D 0LL; ^ /tmp/stappEHxIa/stap_b1cc5d80db2fc511db3feaaaf7d971a3_1314_src.c:221:12: er= ror: =E2=80=98struct probe_2463_locals=E2=80=99 has no member named =E2=80=98__t= mp8=E2=80=99 if (l->__tmp8++ >=3D l->__tmp7) goto break_0; ^ make[1]: *** [/tmp/stappEHxIa/stap_b1cc5d80db2fc511db3feaaaf7d971a3_1314_sr= c.o] Error 1 --=20 You are receiving this mail because: You are the assignee for the bug.