From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29114 invoked by alias); 5 Oct 2010 00:24:46 -0000 Received: (qmail 29102 invoked by uid 22791); 5 Oct 2010 00:24:44 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Oct 2010 00:24:37 +0000 From: "potswa at mac dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/45841] [4.6 Regression]: r164529 cris-elf libstdc++ 27_io/basic_filebuf/seekoff/char/2-io.cc X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: potswa at mac dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: hp at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Tue, 05 Oct 2010 00:24:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg00364.txt.bz2 Message-ID: <20101005002400.eRvJXNoWiW2fQ9yBmGEzmNLh6Bo1x2RMt21Z6KPjVRM@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D45841 --- Comment #16 from David Krauss 2010-10-05 00:24:= 35 UTC --- (In reply to comment #15) > r164528: > ... > read(4, "1", 1) =3D 1 > lseek(4, 4294967295, SEEK_CUR) =3D 4294967303 > write(4, "x", 1) =3D 1 > write(4, "\n", 1) =3D 1 > lseek(4, 0, SEEK_CUR) =3D 4294967305 > read(4, "", 1) =3D 0 > read(4, "", 1) =3D 0 > lseek(4, 0, SEEK_END) =3D 4294967305 > ... >=20 > r164529: > ... > read(4, "1", 1) =3D 1 > lseek(4, 0, SEEK_CUR) =3D 8 > lseek(4, 4294967295, SEEK_CUR) =3D 4294967303 > write(4, "x", 1) =3D 1 > write(4, "\n", 1) =3D 1 > lseek(4, 0, SEEK_CUR) =3D 4294967305 > read(4, "", 1) =3D 0 > read(4, "", 1) =3D 0 > write(2, "assertion \"", 11assertion ") =3D 11 The failure had nothing to do with the additional seek. The excerpts above = show that the added operation didn't move the file pointer=E2=80=A6 the failure = occurred at the same position as success before the patch. What the testcase ends up doing is extending the file and then reading past EOF. That's not illegal behavior and the case as written should still pass after comparing EOF =3D=3D EOF, just as it did before my patch. Hmm, yep, caught a bug in my patch! Thanks!