Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
aligned-new7.C
blob: 5b364d6966201bd9c1ccbbc310e7356c964905cd [
file
] [
log
] [
blame
]
// PR c++/77742
// { dg-do compile { target c++17 } }
// { dg-options "-Wall" }
#include
<new>
struct
X
{
alignas
(
2
*
__STDCPP_DEFAULT_NEW_ALIGNMENT__
)
int
i
;
};
alignas
(
alignof
(
X
))
char
buf
[
sizeof
(
X
)];
int
main
()
{
::
new
((
void
*)
buf
)
X
{
1
};
}