Add workaround for aligned_alloc bug on AIX
authorJonathan Wakely <jwakely@redhat.com>
Mon, 30 Jul 2018 17:12:44 +0000 (18:12 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 30 Jul 2018 17:12:44 +0000 (18:12 +0100)
commit1b3b888d117da2f0e03d84db1e42749b304ba3b5
tree07acab6e28a1021cced45532f4b25b59a52ca0c4
parent81bdfc1e2940fc93bcd0bba4416daff47f04f3b3
Add workaround for aligned_alloc bug on AIX

20_util/memory_resource/2.cc FAILs on AIX 7.2.0.0, because aligned_alloc
incorrectly requires the alignment to be a multiple of sizeof(void*).

This adds a workaround to the operator new overload taking an alignment
value, to increase the alignment (and size) if needed.

* libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
workaround for aligned_alloc bug on AIX.
* testsuite/18_support/new_aligned.cc: New test.

From-SVN: r263073
libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/new_opa.cc
libstdc++-v3/testsuite/18_support/new_aligned.cc [new file with mode: 0644]