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
This commit is contained in:
parent
2754b50bc7
commit
eb530cab9a
@ -1,3 +1,8 @@
|
||||
2019-05-20 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
|
||||
test by passing correct alignment to deallocate function.
|
||||
|
||||
2019-05-18 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/90520
|
||||
|
@ -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<max_align_t>(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));
|
||||
|
Loading…
Reference in New Issue
Block a user