Re: [C++ Patch] PR 54984

2012-10-26 Thread Jason Merrill
On 10/25/2012 09:15 PM, Paolo Carlini wrote: I'm not sure the testcase can't be improved, I'm not very familiar with dg-final. You could do an execution test using a user-defined operator new which initializes the memory to something other than 0. OK with that change. Also, in case we

Re: [C++ Patch] PR 54984

2012-10-26 Thread Paolo Carlini
Hi, On 10/26/2012 02:44 PM, Jason Merrill wrote: On 10/25/2012 09:15 PM, Paolo Carlini wrote: I'm not sure the testcase can't be improved, I'm not very familiar with dg-final. You could do an execution test using a user-defined operator new which initializes the memory to something other

[C++ Patch] PR 54984

2012-10-25 Thread Paolo Carlini
Hi, in this very old regression, which AFAICS dates back to when we started using VECs, in templates we wrongly handle: new char[size] like new char[size]() Turns out the issue is simple: in build_new, when *init is null we wrongly turn it into a pointer to an empty vector when we