BUG REPORT: Cygwin, g++, -O2, static member function, std::string RUN COMMAND: ./bug.sh RESULT: assertion "r != 0" failed SIDE EFFECTS: the files ./bug0.hpp, bug1.cpp, and bug2.cpp are created. uname -a Linux snark 2.6.15-28-amd64-server #1 SMP Wed Jul 18 23:04:02 UTC 2007 x86_64 GNU/Linux g++ --version g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. g++ bug1.cpp bug2.cpp -O1 -o bug ./bug g++ bug1.cpp bug2.cpp -O2 -o bug ./bug