https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
--- Comment #8 from Andrew Pinski ---
(In reply to Eyal Rozenberg from comment #6)
> (In reply to Richard Biener from comment #5)
> > DSE part ... DCE
>
> DSE = Dead Statement Elimination? DCE = Dead Code Elimination?
I thought Dse was dead st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
--- Comment #7 from rguenther at suse dot de ---
On Tue, 24 Mar 2020, eyalroz at technion dot ac.il wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
>
> --- Comment #6 from Eyal Rozenberg ---
> (In reply to Richard Biener from comme
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
--- Comment #6 from Eyal Rozenberg ---
(In reply to Richard Biener from comment #5)
> DSE part ... DCE
DSE = Dead Statement Elimination? DCE = Dead Code Elimination?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
Richard Biener changed:
What|Removed |Added
CC||rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
--- Comment #4 from Marc Glisse ---
Or just
void f(){
int*p=new int[1];
*p=42;
delete[] p;
}
while it does optimize for
void f(){
int*p=new int;
*p=42;
delete p;
}
because the front-end gives us a clobber before operator delete.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
--- Comment #3 from Eyal Rozenberg ---
(In reply to Marc Glisse from comment #1)
You should probably post that comment on the second, related, bug 94294 - which
is about the fact that GCC keeps the new and delete. This one is strictly about
the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
--- Comment #2 from Eyal Rozenberg ---
Note:
The bugs also manifest with this slightly simpler program:
#include
int bar() {
std::string second { "Hey... no small-string optimization for me please!"
};
return 123;
}
See: https://god
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293
--- Comment #1 from Marc Glisse ---
Adding
inline void* operator new(std::size_t n){return __builtin_malloc(n);}
inline void operator delete(void*p)noexcept{__builtin_free(p);}
inline void operator delete(void*p,std::size_t)noexcept{__builtin_fr