2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / aligned-new8.C
blob9c125204d635b4a84e104d206aa3da725ed9e15b
1 // PR c++/82760
2 // { dg-do run { target c++17 } }
4 #include <new>
5 #include <cstddef>
7 struct alignas(2 * alignof (std::max_align_t)) aligned_foo {
8   char x[2048];
10   ~aligned_foo() { }
11   aligned_foo() { __builtin_memset(x, 0, sizeof(x)); }
14 int main()
16   aligned_foo * gFoo = new (std::nothrow) aligned_foo[2];
17   delete[] gFoo;