On Wed, Jul 31, 2019 at 10:37 AM Martin Liška <mli...@suse.cz> wrote: > > On 7/30/19 4:00 PM, Marc Glisse wrote: > > On Tue, 30 Jul 2019, Martin Liška wrote: > > > >> Ah, that's bad, both of them need a care: > > > > Yes, that makes more sense to me, thanks. > > > >>> I tried to experiment to understand, but it is complicated because > >>> including <new> disables the optimization: > >>> > >>> #include <new> > >>> void fn1() { > >>> char*p=new char; > >>> delete p; > >>> } > >>> > >>> This ICEs with -O -std=c++17: > >>> > >>> int a = 64; > >>> std::align_val_t b{64}; > >>> void fn1() { > >>> void *s = operator new(a,b); > >>> operator delete(s,8+*(unsigned long*)s,b); > >>> } > >>> > >>> > >> > >> I can't see it on current master. Can you? > > > > Yes. I just did a clean build to make sure. > > > > That's addressed in a patch I'm attaching. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed?
OK. > Thanks, > Martin