Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.dg/other/pr80534-2.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/g++.dg/other/pr80534-2.C Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,27 @@ +// PR c++/80534 +// { dg-do compile { target c++11 } } +// { dg-options "" } + +template <int, int> struct aligned_storage { + struct type { + char __data[0]; + }; +}; +struct A {}; +template <typename _Tp, typename = _Tp> struct unique_ptr; +template <typename _Tp, typename _Dp> struct unique_ptr<_Tp[], _Dp> { + int _M_t; + void get() { _M_t; } +}; +struct B { + using Association = A; + using Storage = aligned_storage<sizeof(Association), alignof(Association)>::type; + using StorageUniquePointer = unique_ptr<Storage[]>; + void getAssociationsBegin() { storageUniquePointer_.get(); } + StorageUniquePointer storageUniquePointer_; +}; +struct C {}; +using MainThreadStaticSignalsReceiver = C; +aligned_storage<sizeof(MainThreadStaticSignalsReceiver), + alignof(MainThreadStaticSignalsReceiver)>::type + mainThreadStaticSignalsReceiverStorage;