------- Comment #11 from jakub at gcc dot gnu dot org 2006-09-30 11:49 ------- The primary advantage of the single entry optimization is actually that at tree level we can find out if something is only addressable because of the memcpy/memset/mempcpy/memmove and not for other reasons. So, creating a pointer to the object, adding may_alias attribute to the type and dereferencing it doesn't buy us much, because it would still be addressable. So, either we have a way to mark the VAR_DECL (or component thereof) read resp. write with alias set 0, or we need the patch I posted, possibly with additional check for C++/ObjC++ and don't do the optimization at all for C++.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29272