http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45699
--- Comment #9 from bredelin at ucla dot edu 2010-10-08 16:37:15 UTC --- On x86_32, the problem occurs somewhat differently. All I did differently is add "-m32". It seems that on x86_32, the copy constructor vector<int>::vector<int>(const vector& __x) for SuperModel2::object fails, whereas it succeeded on x86_64. The values for "this" and "__x" are not optimized out for SuperModel2::object, so they can be inspected. The values for __x appear to be crazy. This leads to a large __n, and thus another abort because of an attempt to allocate too much memory. (__n should be 0). The error may be caused by the fact that &__x points to the wrong memory location (0xffffd4a0, instead of the correct value 0xffffd484). I think the location of __x is wrong on x86_64 also, but it just so happens on x86_64 that __x._M_finish - __x._M_start is 0 for the wrong location of __x, whereas on x86_32 it does not happen to be 0. Does this help any?