[libcxx] r328245 - Use DoNotOptimize to prevent new/delete elision.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 24 15:41:41 PDT 2018


Still?

I would of hoped this patch fixed it.

Could you provide the test output?

/Eric

On Sat, Mar 24, 2018 at 4:39 PM, Francois Pichet <pichet2000 at gmail.com>
wrote:

> Hi,
>
> I am seeing failure on this test too.
>     test\std\utilities\memory\default.allocator\allocator.member
> s\construct.pass.cpp
>
> For the same reason : new optimized away.
>
>
> On Thu, Mar 22, 2018 at 5:28 PM, Eric Fiselier via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> Author: ericwf
>> Date: Thu Mar 22 14:28:09 2018
>> New Revision: 328245
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=328245&view=rev
>> Log:
>> Use DoNotOptimize to prevent new/delete elision.
>>
>> The new/delete tests, in particular those which test replacement
>> functions, often fail when the optimizer is enabled because the
>> calls to new/delete may be optimized away, regardless of their
>> side-effects.
>>
>> This patch converts the tests to use DoNotOptimize in order to prevent
>> the elision.
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180324/415a59b9/attachment.html>


More information about the cfe-commits mailing list