Re: [Bug c++/44186] New: Wrong code generated with -O2 and above

2010-05-17 Thread Andrew Pinski
Sent from my iPhone On May 17, 2010, at 8:37 PM, "eyakubovich at gmail dot com" > wrote: This is a stripped down code from proposed Boost.Move library. Asserts don't fire with -O0 and -O1 but do with -O2 and -O3 #include template class rv : public T { rv(); ~rv(); rv(rv const&);

[Bug c++/44186] New: Wrong code generated with -O2 and above

2010-05-17 Thread eyakubovich at gmail dot com
This is a stripped down code from proposed Boost.Move library. Asserts don't fire with -O0 and -O1 but do with -O2 and -O3 #include template class rv : public T { rv(); ~rv(); rv(rv const&); void operator=(rv const&); }; template rv& move(T& x) { return *static_cast* >(&x); }