Paul Leopardi wrote: > I have now downloaded, bootstapped and installed gcc 4.0.1. The bug in g++ > optimization is still there. I've made an attempt to follow the instructions > on minimizing test cases and have so far accomplished: > wc of old preprocessed source: > 99412 260586 2965538 peg01.ii > wc of new preprocessed source: > 69309 241979 2668391 peg01.ii > As you can see, this is not much of a reduction. The bug I'm seeing keeps > disappearing as I try to reduce the source code. It seems to be a subtle > interaction between the Barton-Nackman trick, Boost uBLAS, GNU hash_map and > the g++ flags -fstrict-aliasing and -finline-functions. If I try to eliminate > any of these, the bug disappears.
You might want to try a recent snapshot of gcc 4.0.2, first. Two aliasing bugs got fixed after the 4.0.1 release: http://gcc.gnu.org/PR22591 http://gcc.gnu.org/PR23192 The first even caused std::list::swap to be miscompiled. Regards, Volker