blob: 2bfb6b8d51933480fcedefaf4fce83ac9c3e6947 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// { dg-options -std=c++17 }
// { dg-do run }
#include <new>
struct alignas(64) A {
int i;
};
void* operator new (std::size_t n, std::align_val_t)
{
return operator new (n);
}
bool deleted = false;
void operator delete (void *p, std::size_t, std::align_val_t)
{
deleted = true;
operator delete (p);
}
int main()
{
A *p = new A;
delete p;
if (!deleted)
__builtin_abort();
}
|