public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/1598: istream::ignore() fails to discard a character
@ 2001-04-01 0:00 Benjamin Kosnik
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Kosnik @ 2001-04-01 0:00 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR libstdc++/1598; it has been noted by GNATS.
From: Benjamin Kosnik <bkoz@redhat.com>
To: gcc-gnats@gcc.gnu.org, mon@hks.com
Cc:
Subject: Re: libstdc++/1598: istream::ignore() fails to discard a character
Date: Tue, 9 Jan 2001 17:01:01 -0800
This is fixed in current CVS.
%a.out
READING test.txt
LINE1 word2 word3 17
LINE2 word2 word3 17
..... 5
.... 4
... 3
.. 2
. 1
0
-benjamin
>From larry@pink.dhs.org Sun Apr 01 00:00:00 2001
From: larry@pink.dhs.org
To: gcc-gnats@gcc.gnu.org
Subject: c++/2240: internal compiler error on static arrays inside templates
Date: Sun, 01 Apr 2001 00:00:00 -0000
Message-id: <20010309052953.6882.qmail@sourceware.cygnus.com>
X-SW-Source: 2001-q1/msg02142.html
Content-length: 1083
>Number: 2240
>Category: c++
>Synopsis: internal compiler error on static arrays inside templates
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 08 21:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: larry@pink.dhs.org
>Release: 2.95.2
>Organization:
>Environment:
linux mandrake x86 OR osf1 alpha
>Description:
"Internal compiler error" whenever I declare a
static const array that is initialized useing arithmatic
operators.
static const foo[] = {1, 2, 3}
does not trigger bug
static const foo[4] = {-1}
does trigger it
>How-To-Repeat:
compile quux.cc
>Fix:
I have no idea
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="quux.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="quux.cc"
dGVtcGxhdGU8Y2xhc3MgVD4gY2xhc3MgZm9vIHsKICBjb25zdCBzdGF0aWMgIGludCAgYmF6W10g
ID0gey0xfSA7Cn07Cg==
^ permalink raw reply [flat|nested] 2+ messages in thread
* libstdc++/1598: istream::ignore() fails to discard a character
@ 2001-04-01 0:00 m
0 siblings, 0 replies; 2+ messages in thread
From: m @ 2001-04-01 0:00 UTC (permalink / raw)
To: gcc-gnats; +Cc: mon
>Number: 1598
>Category: libstdc++
>Synopsis: istream::ignore() fails to discard a character
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 09 15:16:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Nick Monyatovsky
>Release: RedHat 6.1
>Organization:
>Environment:
gcc version 2.95.2 19991024 (release)
>Description:
The istream::ignore() method fails to discard a character.
Other platforms tested (SGI, HP-UX, SUN, AIX) do not have
this problem. Workaround exists (see below), but much of
the pre-written software is unfunctional.
>How-To-Repeat:
% cat > test.txt
LINE1 word2 word3
LINE2 word2 word3
.....
....
...
..
.
CTRL-D
% g++ demoIgnore.C
% ./a.out
>Fix:
The extended syntax which is currently commented out in the
attached demoIgnore.C file works, but is awkward:
istream.ignore(1,'\n')
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="demoIgnore.C"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="demoIgnore.C"
Ly8gVGhpcyBmaWxlIHJ1bnMgaW50byBhbiBlbmRsZXNzIGxvb3Agb24gTGludXggZHVlIHRvCi8v
IGlzdHJlYW06Omlnbm9yZSgpIG1ldGhvZCBmYWlsaW5nIHRvIGRpc2NhcmQgYSBjaGFyYWN0ZXIu
CgoKI2luY2x1ZGUgPGlvc3RyZWFtLmg+CiNpbmNsdWRlIDxmc3RyZWFtLmg+CiNpbmNsdWRlIDxz
dHJzdHJlYW0uaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKdm9pZCAgcHJvY2Vzc0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0dXJu
IDA7Cn0K
>From pme@gcc.gnu.org Sun Apr 01 00:00:00 2001
From: pme@gcc.gnu.org
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: libstdc++/759
Date: Sun, 01 Apr 2001 00:00:00 -0000
Message-id: <20010127021602.27607.qmail@sourceware.cygnus.com>
X-SW-Source: 2001-q1/msg00761.html
Content-length: 707
The following reply was made to PR libstdc++/759; it has been noted by GNATS.
From: pme@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org,
schmid@snake.iap.physik.tu-darmstadt.de
Cc:
Subject: Re: libstdc++/759
Date: 27 Jan 2001 02:15:25 -0000
Synopsis: Segmentation Fault Bug in modulators setw and ios::left
State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Fri Jan 26 18:15:24 2001
State-Changed-Why:
Using current CVS:
% g++ -W -Wall -pedantic 759.cc
% ./a.out
12345678901 2345678
%
So it appears this bug has been fixed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=759&database=gcc
>From fnf@ninemoons.com Sun Apr 01 00:00:00 2001
From: fnf@ninemoons.com
To: gcc-gnats@gcc.gnu.org
Cc: fnf@ninemoons.com
Subject: c++/2182: Internal compiler error in latest gcc (trunk & gcc 3) using -fpic
Date: Sun, 01 Apr 2001 00:00:00 -0000
Message-id: <200103051719.f25HJDh06803@localhost.ninemoons.com>
X-SW-Source: 2001-q1/msg02023.html
Content-length: 8470
>Number: 2182
>Category: c++
>Synopsis: Internal compiler error in latest gcc (trunk & gcc 3 branch) using -fpic
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Mon Mar 05 09:26:04 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 2.97 20010201 (experimental)
>Organization:
none
>Environment:
System: Linux fishpond 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /src/sourceware/gcc/gcc/configure -v --prefix=/usr/sourceware
>Description:
Gcc produces an internal compiler error using the provided preprocessed testcase.
I've tested the latest head of the development trunk, as well as the gcc 3 branch.
>How-To-Repeat:
Script started on Mon Mar 5 10:01:52 2001
$ ./cc1plus -quiet bug.ii
$ ./cc1plus -quiet -fpic bug.ii
MPEGyuv2rgb.cpp: In function `void yuv2rgb(unsigned char*, const unsigned
char*, const unsigned char*, const unsigned char*, int, int, int)':
MPEGyuv2rgb.cpp:250: Internal compiler error in instantiate_virtual_regs_1, at
function.c:3911
Please submit a full bug report, with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
$ cat bug.ii
# 1 "MPEGyuv2rgb.cpp"
# 1 "MPEGyuv2rgb.h" 1
extern "C" {
void yuv2rgb(unsigned char * destination,
const unsigned char * Y,
const unsigned char * Cb,
const unsigned char * Cr,
int width, int height, int stride);
}
# 2 "MPEGyuv2rgb.cpp" 2
void yuv2rgb(unsigned char * destination,
const unsigned char * Y,
const unsigned char * Cb,
const unsigned char * Cr,
int width, int height, int stride)
{
static const unsigned short delta[] = {
0x8080, 0x8080, 0x8080, 0x8080,
0x00ff, 0x00ff, 0x00ff, 0x0000 };
static const short scale[] = {
short(1.732 * 256), short(-0.336 * 256), 0, 0,
0, short(-0.698 * 256), short(1.371 * 256), 0 };
asm volatile(
"2:"
"pushl %0\n"
"pushl %6\n"
"1:"
"movq (%1),%%mm0\n"
"movq (%2),%%mm1\n"
"psubb %4,%%mm0\n"
"psubb %4,%%mm1\n"
"punpcklbw %%mm0,%%mm0\n"
"movq %%mm0,%%mm4\n"
"punpcklbw %%mm1,%%mm1\n"
"movq %%mm1,%%mm5\n"
"punpcklwd %%mm0,%%mm0\n"
"punpcklwd %%mm1,%%mm1\n"
"movq %%mm0,%%mm2\n"
"punpckldq %%mm0,%%mm0\n"
"movq %%mm1,%%mm3\n"
"punpckhdq %%mm2,%%mm2\n"
"pmulhw %5,%%mm0\n"
"punpckldq %%mm1,%%mm1\n"
"pmulhw 8+%5,%%mm1\n"
"punpckhdq %%mm3,%%mm3\n"
"pmulhw %5,%%mm2\n"
"punpckhwd %%mm4,%%mm4\n"
"movq %%mm4,%%mm6\n"
"punpckhwd %%mm5,%%mm5\n"
"pmulhw 8+%5,%%mm3\n"
"punpckldq %%mm4,%%mm4\n"
"pmulhw %5,%%mm4\n"
"punpckhdq %%mm6,%%mm6\n"
"pmulhw %5,%%mm6\n"
"movq %%mm5,%%mm7\n"
"punpckldq %%mm5,%%mm5\n"
"paddsw %%mm1,%%mm0\n"
"pmulhw 8+%5,%%mm5\n"
"punpckhdq %%mm7,%%mm7\n"
"pmulhw 8+%5,%%mm7\n"
"paddsw %%mm3,%%mm2\n"
"paddsw %%mm5,%%mm4\n"
"paddsw %%mm7,%%mm6\n"
"movq (%8),%%mm1\n"
"punpcklbw %%mm1,%%mm1\n"
"movq %%mm1,%%mm5\n"
"punpcklwd %%mm1,%%mm1\n"
"punpckhwd %%mm5,%%mm5\n"
"movq %%mm1,%%mm3\n"
"movq %%mm5,%%mm7\n"
"punpckldq %%mm1,%%mm1\n"
"punpckldq %%mm5,%%mm5\n"
"pand 8+%4,%%mm1\n"
"punpckhdq %%mm3,%%mm3\n"
"paddsw %%mm0,%%mm1\n"
"pand 8+%4,%%mm5\n"
"punpckhdq %%mm7,%%mm7\n"
"pand 8+%4,%%mm3\n"
"paddsw %%mm2,%%mm5\n"
"pand 8+%4,%%mm7\n"
"paddsw %%mm0,%%mm3\n"
"packuswb %%mm3,%%mm1\n"
"paddsw %%mm2,%%mm7\n"
"packuswb %%mm7,%%mm5\n"
"movq %%mm1,0x00(%0)\n"
"movq %%mm5,0x08(%0)\n"
"movq (%8),%%mm1\n"
"punpckhbw %%mm1,%%mm1\n"
"movq %%mm1,%%mm5\n"
"punpcklwd %%mm1,%%mm1\n"
"punpckhwd %%mm5,%%mm5\n"
"movq %%mm1,%%mm3\n"
"movq %%mm5,%%mm7\n"
"punpckldq %%mm1,%%mm1\n"
"punpckldq %%mm5,%%mm5\n"
"pand 8+%4,%%mm1\n"
"punpckhdq %%mm3,%%mm3\n"
"paddsw %%mm4,%%mm1\n"
"pand 8+%4,%%mm5\n"
"punpckhdq %%mm7,%%mm7\n"
"pand 8+%4,%%mm3\n"
"paddsw %%mm6,%%mm5\n"
"pand 8+%4,%%mm7\n"
"paddsw %%mm4,%%mm3\n"
"packuswb %%mm3,%%mm1\n"
"paddsw %%mm6,%%mm7\n"
"packuswb %%mm7,%%mm5\n"
"movq %%mm1,0x10(%0)\n"
"movq %%mm5,0x18(%0)\n"
"addl (%%esp),%8\n"
"movq (%8),%%mm1\n"
"punpcklbw %%mm1,%%mm1\n"
"movq %%mm1,%%mm5\n"
"punpcklwd %%mm1,%%mm1\n"
"punpckhwd %%mm5,%%mm5\n"
"movq %%mm1,%%mm3\n"
"movq %%mm5,%%mm7\n"
"punpckldq %%mm1,%%mm1\n"
"punpckldq %%mm5,%%mm5\n"
"pand 8+%4,%%mm1\n"
"punpckhdq %%mm3,%%mm3\n"
"paddsw %%mm0,%%mm1\n"
"pand 8+%4,%%mm5\n"
"punpckhdq %%mm7,%%mm7\n"
"pand 8+%4,%%mm3\n"
"paddsw %%mm2,%%mm5\n"
"pand 8+%4,%%mm7\n"
"paddsw %%mm0,%%mm3\n"
"packuswb %%mm3,%%mm1\n"
"paddsw %%mm2,%%mm7\n"
"packuswb %%mm7,%%mm5\n"
"movq %%mm1,0x00(%0,%3)\n"
"movq %%mm5,0x08(%0,%3)\n"
"movq (%8),%%mm1\n"
"punpckhbw %%mm1,%%mm1\n"
"movq %%mm1,%%mm5\n"
"punpcklwd %%mm1,%%mm1\n"
"punpckhwd %%mm5,%%mm5\n"
"movq %%mm1,%%mm3\n"
"movq %%mm5,%%mm7\n"
"punpckldq %%mm1,%%mm1\n"
"punpckldq %%mm5,%%mm5\n"
"pand 8+%4,%%mm1\n"
"punpckhdq %%mm3,%%mm3\n"
"paddsw %%mm4,%%mm1\n"
"pand 8+%4,%%mm5\n"
"punpckhdq %%mm7,%%mm7\n"
"pand 8+%4,%%mm3\n"
"paddsw %%mm6,%%mm5\n"
"pand 8+%4,%%mm7\n"
"paddsw %%mm4,%%mm3\n"
"packuswb %%mm3,%%mm1\n"
"paddsw %%mm6,%%mm7\n"
"packuswb %%mm7,%%mm5\n"
"movq %%mm1,0x10(%0,%3)\n"
"movq %%mm5,0x18(%0,%3)\n"
"subl (%%esp),%8\n"
"addl $32,%0\n"
"addl $4,%1\n"
"addl $4,%2\n"
"addl $8,%8\n"
"subl $8,%6\n"
"jg 1b\n"
"popl %6\n"
"popl %0\n"
"addl %6,%8\n"
"leal (%0,%3,2),%0\n"
"subl $2,%7\n"
"jg 2b\n"
"emms\n"
:
: "r" (destination), "r" (Cb), "r" (Cr), "r" (stride),
"m" (delta), "m" (scale), "m" (width), "m" (height), "r" (Y)
);
}
$ exit
Script done on Mon Mar 5 10:02:14 2001
>Fix:
Workaround is to compile without -fpic.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-04-01 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-01 0:00 libstdc++/1598: istream::ignore() fails to discard a character Benjamin Kosnik
2001-04-01 0:00 m
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).