From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5107 invoked by alias); 12 May 2010 09:28:35 -0000 Received: (qmail 5057 invoked by uid 48); 12 May 2010 09:28:23 -0000 Date: Wed, 12 May 2010 13:08:00 -0000 From: "mjw at redhat dot com" To: systemtap@sources.redhat.com Message-ID: <20100512092821.11590.mjw@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug translator/11590] New: optimized pre/postfix operators on variable throw away initial variable assignment X-Bugzilla-Reason: AssignedTo 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 X-SW-Source: 2010-q2/txt/msg00317.txt.bz2 The following testcase shows that the original assignment of the variable is ignored: probe begin { a = 5 // printf("%d ", a) printf("%d ", (a++)) printf("%d ", (++a)) printf("%d ", (a--)) printf("%d\n", (--a)) exit() } $ stap test.stp 0 2 2 0 If we uncomment the actually first use the original assigned value of a things look correct: $ stap test.stp 5 5 7 7 5 This is an translation optimization issue, the original script also prints out the correct value when unoptimized: $ stap -u test.stp 5 7 7 5 -- Summary: optimized pre/postfix operators on variable throw away initial variable assignment Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator AssignedTo: systemtap at sources dot redhat dot com ReportedBy: mjw at redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=11590 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.