testsuite: update mangling
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / no_unique_address6.C
blob427db4439dda54c05187ddd65ccf665ab4ab7654
1 // PR c++/95976
2 // { dg-do compile { target c++20 } }
4 struct empty {};
6 union no_attribute_t
8   empty _0;
9   empty _1;
12 union with_attribute_t
14   [[no_unique_address]] empty _0;
15   [[no_unique_address]] empty _1;
18 constexpr no_attribute_t no_attribute{};
19 constexpr with_attribute_t with_attribute{};
21 // This succeeds
22 static_assert( &no_attribute._0 == &no_attribute._1 );
24 // This fails
25 static_assert( &with_attribute._0 == &with_attribute._1 );