public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3705: optimisation bug
@ 2001-07-16 20:26 Corrin Lakeland
0 siblings, 0 replies; only message in thread
From: Corrin Lakeland @ 2001-07-16 20:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 3705
>Category: c++
>Synopsis: -freg-struct-return generates incorrect code with C++ streams
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Mon Jul 16 20:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Corrin Lakeland
>Release: 3.0
>Organization:
>Environment:
System: Linux freki.otago.ac.nz 2.4.2-2 #1 Sun Apr 8 18:47:21 EDT 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/home/lakeland : (reconfigured) ./configure --prefix=/home/lakeland/gcc
>Description:
Any C++ code using streams, including cin/cout/cerr, and compiled with
the optimisation flag -freg-struct-return causes segfaults when run
>How-To-Repeat:
freki ~ % cat dummy.cc
include <iostream.h>
int main(void)
{
cout << "Hello " << 3 << endl;
return 0;
}
freki ~ % g++ -freg-struct-return dummy.cc
freki ~ % ./a.out
Hello Segmentation fault
freki ~ % g++ dummy.cc
freki ~ % ./a.out
Hello 3
I hope I filled this in right...
>Fix:
Don't use -freg-struct-return
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-07-16 20:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 20:26 c++/3705: optimisation bug Corrin Lakeland
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).