------- Comment #4 from rguenth at gcc dot gnu dot org 2006-09-29 14:38 ------- One way to paper over the problem is to move std::new out-of-line :( Otherwise I cannot see how we can fix this in libsupc++ without gcc help. Basically we somehow need to insert (at least) a memory barrier here, like with
inline void* operator new(std::size_t, void* __p) throw() { __asm__ volatile ("" : : : "memory"); return __p; } but that might pessimize code too much. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286