gcc 4.4.1/linux 64bit: code crashes with -O3, works with -O2
Jonathan Wakely
jwakely.gcc@gmail.com
Thu Jan 14 22:37:00 GMT 2010
2010/1/14 Christoph Rupp:
>
> To reproduce, these steps are necessary:
>
> wget http://crupp.de/dl/hamsterdb-1.1.1.tar.gz
> tar -zxvf hamsterdb-1.1.1.tar.gz
> cd hamsterdb-1.1.1
> ./configure --enable-internal
> make
There are lots of these warnings, which you ignore at your peril:
freelist.c:3326: warning: dereferencing type-punned pointer will break
strict-aliasing rules
ham_info.c:80: warning: dereferencing type-punned pointer will break
strict-aliasing rules
env.cpp:1804: warning: dereferencing type-punned pointer will break
strict-aliasing rules
You should probably either fix those warnings, avoid compiling at high
optimisation levels, or use -fno-strict-aliasing (which allows the
tests to run successfully.)
More information about the Gcc
mailing list