From eb530cab9a02ab8f223883422f74f4f3a4b24c64 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 20 May 2019 12:14:56 +0100 Subject: [PATCH] Fix test bug with mismatched alignment in allocate/deallocate * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix test by passing correct alignment to deallocate function. From-SVN: r271408 --- libstdc++-v3/ChangeLog | 5 +++++ .../experimental/memory_resource/new_delete_resource.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c7b20f10dc5..0b07d0efdcd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-05-20 Jonathan Wakely + + * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix + test by passing correct alignment to deallocate function. + 2019-05-18 Jonathan Wakely PR libstdc++/90520 diff --git a/libstdc++-v3/testsuite/experimental/memory_resource/new_delete_resource.cc b/libstdc++-v3/testsuite/experimental/memory_resource/new_delete_resource.cc index 5c5a0a4d7e3..41232b6fc67 100644 --- a/libstdc++-v3/testsuite/experimental/memory_resource/new_delete_resource.cc +++ b/libstdc++-v3/testsuite/experimental/memory_resource/new_delete_resource.cc @@ -103,7 +103,6 @@ test02() void test03() - { using std::max_align_t; using std::size_t; @@ -123,7 +122,8 @@ test03() p = r1->allocate(2, alignof(char)); VERIFY( bytes_allocated == 2 ); VERIFY( aligned(p) ); - r1->deallocate(p, 2); + r1->deallocate(p, 2, alignof(char)); + __builtin_printf("%d\n", (int)bytes_allocated); VERIFY( bytes_allocated == 0 ); p = r1->allocate(3, alignof(short)); -- 2.30.2