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

Francois Pichet via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 24 15:39:08 PDT 2018


Hi,

I am seeing failure on this test too.
    test\std\utilities\memory\default.allocator\allocator.
members\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/12e39d93/attachment.html>


More information about the cfe-commits mailing list