------- Comment #33 from ian at airs dot com  2007-05-03 20:33 -------
Created an attachment (id=13504)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13504&action=view)
Patch

Here is a much simpler patch which also fixes the problem.  This simply inserts
a memory clobber before each placement new.  This is safe, but is not as
efficient as possible.  How much do we care about optimizing placement new? 
How often is placement new used in a way which we could in practice optimize
anyhow?

For the test case in this PR, the penalty is pretty severe: gcc can no longer
eliminate the loop.  But this code is obviously artificial in that the loop
serves no purpose.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

Reply via email to