This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Optimization bug in egcs-1.0.1 beta on i686-pc-linux-gnulibc1


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)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]