I have ran into a situation where code compiled on RedHat 8.0 with gcc 3.2 runs well. We have upgraded our systems to Fedora Core 6 with gcc 4.1.1 and now multiple programs are dropping core files left and right. When we turn the optimization off (create a debugable version) the programs act normal and do not core dump.
RedHat 8.0 with gcc 3.2 $ gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/u sr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i 386-redhat-linux --with-system-zlib --enable-__cxa_atexit Thread model: posix gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Fedora Core 6 with gcc 4.1.1 $ gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/u sr/share/info --enable-shared --enable-threads=posix --enable-checking=release - -with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable- libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable -java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java- 1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20061011 (Red Hat 4.1.1-30) Thank You -- Summary: 4.1.1 / 3.2 Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tony dot radca at macys dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33227