+2020-05-13 Alexandre Oliva <oliva@adacore.com>
+
+ PR libstdc++/77691
+ * include/experimental/memory_resource
+ (__resource_adaptor_imp::do_allocate): Handle max_align_t on
+ x86-vxworks as on x86-solaris.
+ (__resource_adaptor_imp::do_deallocate): Likewise.
+ * testsuite/experimental/memory_resource/new_delete_resource.cc:
+ Drop xfail.
+ (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
+ (test03): Drop max-align test for char-aligned alloc.
+
2020-05-08 Ulrich Drepper <drepper@redhat.com>
* include/bits/atomic_base.h (atomic_flag): Implement test member
do_allocate(size_t __bytes, size_t __alignment) override
{
// Cannot use max_align_t on 32-bit Solaris x86, see PR libstdc++/77691
-#if ! (defined __sun__ && defined __i386__)
+#if ! ((defined __sun__ || defined __VXWORKS__) && defined __i386__)
if (__alignment == alignof(max_align_t))
return _M_allocate<alignof(max_align_t)>(__bytes);
#endif
do_deallocate(void* __ptr, size_t __bytes, size_t __alignment) noexcept
override
{
-#if ! (defined __sun__ && defined __i386__)
+#if ! ((defined __sun__ || defined __VXWORKS__) && defined __i386__)
if (__alignment == alignof(max_align_t))
return (void) _M_deallocate<alignof(max_align_t)>(__ptr, __bytes);
#endif
// { dg-do run { target c++14 } }
// { dg-require-cstdint "" }
-// { dg-xfail-run-if "PR libstdc++/77691" { { i?86-*-solaris2.* x86_64-*-solaris2.* } && ilp32 } }
#include <experimental/memory_resource>
#include <cstdlib>
#include <testsuite_hooks.h>
-#if defined __sun__ && defined __i386__
+#if (defined __sun__ || defined __VXWORKS__) && defined __i386__
// See PR libstdc++/77691
# define BAD_MAX_ALIGN_T 1
#endif
p = r1->allocate(2, alignof(char));
VERIFY( bytes_allocated == 2 );
- VERIFY( aligned<max_align_t>(p) );
r1->deallocate(p, 2, alignof(char));
VERIFY( bytes_allocated == 0 );