http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45791
Martin Jambor <jamborm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.14 17:45:52
Ever Confirmed|0 |1
--- Comment #8 from Martin Jambor <jamborm at gcc dot gnu.org> 2010-12-14
17:45:52 UTC ---
I've just confirmed that main of the testcase from the initial bug
description is optimized to nothing even by just the early optimizers
on trunk. My dynamic-type change detection patches postpone that a
little bit, unfortunately (and inevitably) but the final result is the
same. I believe we have testcases already for this.
As far as the testcase from comment #5 is concerned, that is quite
another matter because the object is dynamically allocated there. If
the constructor is inlined, we may do this with improved folding of
O_T_R according to its first parameter. If it is not, we would need
to be able to track the object interprocedurally to verify nothing bad
happens to it (like a call to a destructor followed by a call to
placement new). And of course we would have to solve the "operator
new is not malloc" problem.