1# From james@ruari-quinn.demon.co.uk  Thu Jun  5 11:43:58 2003
2# Return-Path: <james@ruari-quinn.demon.co.uk>
3# Received: from localhost (skeeve [127.0.0.1])
4# 	by skeeve.com (8.12.5/8.12.5) with ESMTP id h558eVui012655
5# 	for <arnold@localhost>; Thu, 5 Jun 2003 11:43:58 +0300
6# Received: from actcom.co.il [192.114.47.1]
7# 	by localhost with POP3 (fetchmail-5.9.0)
8# 	for arnold@localhost (single-drop); Thu, 05 Jun 2003 11:43:58 +0300 (IDT)
9# Received: by actcom.co.il (mbox arobbins)
10#  (with Cubic Circle's cucipop (v1.31 1998/05/13) Thu Jun  5 11:43:29 2003)
11# X-From_: james@ruari-quinn.demon.co.uk Wed Jun  4 20:09:54 2003
12# Received: from smtp1.actcom.net.il by actcom.co.il  with ESMTP
13# 	(8.11.6/actcom-0.2) id h54H9oY05088 for <arobbins@actcom.co.il>;
14# 	Wed, 4 Jun 2003 20:09:52 +0300 (EET DST)
15# 	(rfc931-sender: smtp.actcom.co.il [192.114.47.13])
16# Received: from f7.net (consort.superb.net [209.61.216.22])
17# 	by smtp1.actcom.net.il (8.12.8/8.12.8) with ESMTP id h54HB8To002721
18# 	for <arobbins@actcom.co.il>; Wed, 4 Jun 2003 20:11:09 +0300
19# Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164])
20# 	by f7.net (8.11.7/8.11.6) with ESMTP id h54H9li15411
21# 	for <arnold@skeeve.com>; Wed, 4 Jun 2003 13:09:47 -0400
22# Received: from monty-python.gnu.org ([199.232.76.173])
23# 	by fencepost.gnu.org with esmtp (Exim 4.20)
24# 	id 19Nbli-0001kD-BL
25# 	for bug-gawk@gnu.org; Wed, 04 Jun 2003 13:09:46 -0400
26# Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20)
27# 	id 19NbZ5-0004V2-71
28# 	for bug-gawk@gnu.org; Wed, 04 Jun 2003 12:56:43 -0400
29# Received: from cicero.e-mis.co.uk ([212.240.194.162])
30# 	by monty-python.gnu.org with esmtp (Exim 4.20)
31# 	id 19NbYK-0003c7-AP
32# 	for bug-gawk@gnu.org; Wed, 04 Jun 2003 12:55:56 -0400
33# Received: from [10.139.58.254] (helo=tacitus)
34# 	by cicero.e-mis.co.uk with esmtp (Exim 3.35 #1 (Debian))
35# 	id 19NbWO-0007Qv-00
36# 	for <bug-gawk@gnu.org>; Wed, 04 Jun 2003 17:53:56 +0100
37# Received: from james by tacitus with local (Exim 3.36 #1 (Debian))
38# 	id 19NbWO-0000cK-00
39# 	for <bug-gawk@gnu.org>; Wed, 04 Jun 2003 17:53:56 +0100
40# To: bug-gawk@gnu.org
41# Subject: 3.1.0 regression
42# Mail-Copies-To: never
43# From: James Troup <james@nocrew.org>
44# User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/20.7 (gnu/linux)
45# Date: Wed, 04 Jun 2003 17:53:56 +0100
46# Message-ID: <874r35wzq3.fsf@nocrew.org>
47# MIME-Version: 1.0
48# Content-Type: text/plain; charset=us-ascii
49# Sender: James Troup <james@ruari-quinn.demon.co.uk>
50# X-Spam-Status: No, hits=-3.9 required=5.0
51# 	tests=EMAIL_ATTRIBUTION,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01,
52# 	      USER_AGENT
53# 	version=2.41
54# X-Spam-Level:
55# X-SpamBouncer: 1.4 (10/07/01)
56# X-SBClass: OK
57# Status: R
58#
59# Hi Aharon,
60#
61# This bug report comes from the Debian bug tracking system.  You can
62# view the full log at:
63#
64#  http://bugs.debian.org/188345
65#
66# Like my other bug, this is a regression from 3.1.0 and I've reproduced
67# this problem with 3.1.2d.
68#
69# "Nikita V. Youshchenko" <yoush@cs.msu.su> writes:
70#
71# | Package: gawk
72# | Version: 1:3.1.2-2
73# | Severity: normal
74# | Tags: sid
75# |
76# | After upgrading gawk from woody to sid, I found one of my scripts not
77# | working. I explored this a little and found minimal script to reproduce
78# | the problem.
79# |
80# | File bug.awk is the following:
81# |
82BEGIN  {
83  WI_total = 0
84}
85{
86  WI_total++
87  {
88    split (  $1, sws, "_" )
89    a = sws[1]
90  }
91  print(sws[1])
92  print(a)
93}
94# |
95# | The second print should output the same what first print poutputs, but
96# | with gawk 3.1.2-2 it outputs nothing:
97# | > echo a_b | gawk -f bug.awk
98# | a
99# |
100# | >
101# |
102# | With gawk from stable I get what expexted:
103# | > echo a_b | gawk -f bug.awk
104# | a
105# | a
106# | >
107# |
108# | If I remove "WI_total++" line, bug disapperas
109# |
110# | -- System Information:
111# | Debian Release: 3.0
112# | Architecture: i386
113# | Kernel: Linux zigzag 2.4.19 16:49:13 MSK 2003 i686
114# | Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R
115# |
116# | Versions of packages gawk depends on:
117# | ii  libc6                         2.3.1-16   GNU C Library: Shared libraries an
118# |
119# | -- no debconf information
120#
121# --
122# James
123#
124