Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp1z/aligned-new7.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 // PR c++/77742 | |
2 // { dg-options "-Wall -std=c++17" } | |
3 | |
4 #include <new> | |
5 | |
6 struct X | |
7 { | |
8 alignas(2*__STDCPP_DEFAULT_NEW_ALIGNMENT__) int i; | |
9 }; | |
10 | |
11 alignas(alignof(X)) char buf[sizeof(X)]; | |
12 | |
13 int main() | |
14 { | |
15 ::new((void*)buf) X{1}; | |
16 } |