Bad interplay between -O2 and -prof -auto-all in GHC-6.6.1
Compiling a certain programme (source in attachment) with ghc-6.6.1 -O2 -prof -auto-all ... results in an executable producing wrong results, in this case none. Compiling with lower optimisation levels or without -auto-all produces correctly working executables.
Source code, input data, quiet and verbose runs included in attachment.
arch and gcc data (also in attached archive):
dafis@localhost:~/Downloads/Euler> uname -a
Linux localhost 2.4.20-4GB-athlon #1 Mon Mar 17 17:56:47 UTC 2003 i686 unknown unknown GNU/Linux
dafis@localhost:~/Downloads/Euler> gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)