From: Jonathan Wakely Date: Mon, 20 May 2019 11:14:56 +0000 (+0100) Subject: Fix test bug with mismatched alignment in allocate/deallocate X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb530cab9a02ab8f223883422f74f4f3a4b24c64;p=gcc.git 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 --- 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));