http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50199
--- Comment #10 from Jan Hubicka <hubicka at ucw dot cz> 2012-01-04 13:14:17 UTC --- > > In general it would be very useful to have pass tagging ADDR_EXPRs on > > whether > > the address of object taken needs to be unique or can change freely. This > > would > > be useful at several places in IPA and also we could then only promote some > > of > > the const decls. > > Well, whether or not is the Frontends burden to decide. And if not, > it has to use an ADDR_EXPR of a CONST_DECL. What I meant here is pass that tracks uses of ADDR_EXPR to see if it possibly can be compared for equality that would break when the object gets duplicated for some reason. This would strenghten some stuff, like hidding COMDAT functions (where we special case already virtual functions, but we could do more) Honza