------- Comment #4 from gcc-bugzilla at contacts dot eelis dot net 2008-08-21 12:51 ------- Isolated and reproduced with GCC 4.4 on x86_64:
#include <iostream> #include <stdint.h> struct A { uint64_t p; char m_ac[18]; A() { std::cout << "default constructed at " << this << '\n'; } ~A() { std::cout << "destructed at " << this << '\n'; } A(A const &) { std::cout << "copy constructed at " << this << '\n'; } }; A f() { return A(); } struct B: A { B(): A(f()) {} }; int main() { B b; } Output: default constructed at 0x7fffd583ca40 destructed at 0x7fffd583ca90 These two addresses really should be the same. -- gcc-bugzilla at contacts dot eelis dot net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gcc-bugzilla at contacts dot | |eelis dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34121