------- Comment #6 from reichelt at gcc dot gnu dot org 2007-02-09 01:16 ------- The bug has nothing to do with -fno-unit-at-a-time. (It is ignored for C++ anyways.)
The bug is fixed since GCC 4.0.0. Btw, here's a shorter self-contained program that hangs when compiled with "g++ -O -finline-functions" by GCC 3.4.x: ==================================== struct A { virtual void FOO() {} }; struct B { A* p; B() : p(new A) {} A* foo(); void bar(); }; A* B::foo() { return p; } void B::bar() { foo()->FOO(); } int main() { B().bar(); return 0; } ==================================== -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |reichelt at gcc dot gnu dot | |org Status|UNCONFIRMED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30637