https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962

--- Comment #8 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 14 Aug 2014, glisse at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962
> 
> --- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
> While looking at some unrelated issue, I noticed the following:
> 
>   _41 = operator new (28);
> ...
>   if (_41 != &_S_empty_rep_storage)
> 
> which happens with a simple use of std::string (with some extra inlining).
> __builtin_malloc(42)==&var is not optimized either, so it isn't (only) an 
> issue
> with operator new.
> 
> If the general case is too dangerous, maybe there is at least some subset that
> could safely be optimized?

Well, not sure if really "dangerous", but yes, doing pointer against
address-of-decl disambiguation should be easily possible.

I'll try to hack sth together later today.

Reply via email to