summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C
blob: 16db2974f2a2c44618d58428b3be911170ed8e61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/93803 - ICE with constexpr init and [[no_unique_address]].
// { dg-do compile { target c++2a } }

struct empty { };

struct foo {
  [[no_unique_address]] empty x;
  constexpr foo() : x{} { }
};

struct bar : foo {
  using foo::foo;
};

constexpr bar a{};