re PR c++/67184 (Missed optimization with C++11 final specifier)
[official-gcc.git] / gcc / testsuite / g++.dg / other / pr80534-2.C
blobe56e7e0a9aef07a4967fa6ccd6acd0ae53dbf8b5
1 // PR c++/80534
2 // { dg-do compile { target c++11 } }
3 // { dg-options "" }
5 template <int, int> struct aligned_storage {
6   struct type {
7     char __data[0];
8   };
9 };
10 struct A {};
11 template <typename _Tp, typename = _Tp> struct unique_ptr;
12 template <typename _Tp, typename _Dp> struct unique_ptr<_Tp[], _Dp> {
13   int _M_t;
14   void get() { _M_t; }
16 struct B {
17   using Association = A;
18   using Storage = aligned_storage<sizeof(Association), alignof(Association)>::type;
19   using StorageUniquePointer = unique_ptr<Storage[]>;
20   void getAssociationsBegin() { storageUniquePointer_.get(); }
21   StorageUniquePointer storageUniquePointer_;
23 struct C {};
24 using MainThreadStaticSignalsReceiver = C;
25 aligned_storage<sizeof(MainThreadStaticSignalsReceiver),
26                 alignof(MainThreadStaticSignalsReceiver)>::type
27     mainThreadStaticSignalsReceiverStorage;