From mboxrd@z Thu Jan 1 00:00:00 1970 From: carlo@alinoe.com To: gcc-gnats@gcc.gnu.org Subject: libstdc++/2907: libstdc++ compiled with optimization fails to initialize ios. Date: Tue, 22 May 2001 17:16:00 -0000 Message-id: <20010523001024.15267.qmail@sourceware.cygnus.com> X-SW-Source: 2001-05/msg00649.html List-Id: >Number: 2907 >Category: libstdc++ >Synopsis: libstdc++ compiled with optimization fails to initialize ios. >Confidential: no >Severity: critical >Priority: high >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue May 22 17:15:59 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Carlo Wood >Release: gcc-ss-20010521 >Organization: >Environment: i686-pc-linux-gnu >Description: A simple "hello world" program (anything that includes ) core dumps when certain configuration flags are used to compile gcc and libstdc++ is compiled with optimization. >How-To-Repeat: None or all of the following might be needed to reproduce the bug: machine: athlon/K7 with linux kernel 2.4.4 distribution: mainly Redhat 7.0 but with a lot rawhide rpms among which: glibc-2.2-12 binutils-2.10.91.0.2-3 Snap shot 20010521 checked out using -r gcc_latest_snapshot Configuration was done by running: env CC=gcc CFLAGS="-O9 -march=pentiumpro -fomit-frame-pointer" \ CXXFLAGS="-O9 -march=pentiumpro -fomit-frame-pointer" \ ./gcc-cvs-3.0/contrib/gcc_build \ -d /usr/src/gcc/gcc-cvs-3.0 \ -o ../gcc-objdir-3.0 \ -c "--prefix=/usr/local/gcc-3.0 --enable-shared --with-gnu-as --with-gnu-ld --enable-languages=c++" \ -m "CFLAGS='-O' LIBCFLAGS='-O0 -ggdb3' LIBCXXFLAGS='-O0 -ggdb3 -fno-implicit-templates'" \ configure where /usr/src/gcc/gcc-cvs-3.0 is my source directory and /usr/src/gcc/gcc-objdir-3.0 is my object directory. Compilation was done by running: env CC=gcc CFLAGS="-O9 -march=pentiumpro -fomit-frame-pointer" \ CXXFLAGS="-O9 -march=pentiumpro -fomit-frame-pointer" \ ./gcc-cvs-3.0/contrib/gcc_build \ -d /usr/src/gcc/gcc-cvs-3.0 \ -o ../gcc-objdir-3.0 \ -c "--prefix=/usr/local/gcc-3.0 --enable-shared --with-gnu-as --with-gnu-ld --enable-languages=c++" \ -m "CFLAGS='-O' LIBCFLAGS='-O0 -ggdb3' LIBCXXFLAGS='-O0 -ggdb3 -fno-implicit-templates'" \ bootstrap Despite what one expects, this result in libstdc++ to be compiled with "-O9 -march=pentiumpro -fomit-frame-pointer". After installation, a simple program like #include int main(void) { return 0; } core dumps when run. >Fix: >Release-Note: >Audit-Trail: >Unformatted: