This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Optimization bug in egcs-1.0.1 beta on i686-pc-linux-gnulibc1
- To: egcs-bugs at cygnus dot com
- Subject: Optimization bug in egcs-1.0.1 beta on i686-pc-linux-gnulibc1
- From: Bernd Nottelmann <nottelm at ptp283 dot uni-muenster dot de>
- Date: Sun, 28 Dec 1997 15:33:47 +0100
- Organization: Westfälische Wilhelms-Universität Münster
Hi,
I found the following bug when I compiled ddd-2.2.1 with egcs-1.0.1-beta
(I hope this has not been reported before!).
Here is an example program:
---------------------------------------------
#include <iostream.h>
#include <typeinfo>
int main() {
int *i1, *i2;
cerr << (typeid(i1)==typeid(i2)) << endl;
}
---------------------------------------------
(iostream.h has no influence!)
> g++ dddtst.C -o dddtst
> ./dddtst
1
> g++ -O dddtst.C -o dddtst
> ./dddtst
Segmentation fault
My configuration is
linux-2.0.33
libc.so.5.4.42
libm.so.5.0.9
libg++.so.27.2.8
libstdc++.so.27.2.8
and
> gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.90.22/specs
gcc version egcs-2.90.22 971220 (egcs-1.01 beta)