repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
aligned-new8.C
blob
9c125204d635b4a84e104d206aa3da725ed9e15b
1
// PR c++/82760
2
// { dg-do run { target c++17 } }
3
4
#include <new>
5
#include <cstddef>
6
7
struct alignas(2 * alignof (std::max_align_t)) aligned_foo {
8
char x[2048];
9
10
~aligned_foo() { }
11
aligned_foo() { __builtin_memset(x, 0, sizeof(x)); }
12
};
13
14
int main()
15
{
16
aligned_foo * gFoo = new (std::nothrow) aligned_foo[2];
17
delete[] gFoo;
18
}