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-Tag: misc/cutover-git~5398 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb530cab9a02ab8f223883422f74f4f3a4b24c64;p=thirdparty%2Fgcc.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 c7b20f10dc52..0b07d0efdcde 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 5c5a0a4d7e3a..41232b6fc674 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));