aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constinit4.C
blob: 0630e18ee0c0bf4a1fed213af4055e4b1ce5de6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/91360 - Implement C++20 P1143R2: constinit
// { dg-do compile { target c++20 } }

struct S { };
constinit extern S s;
constinit S s2 = { };

struct T {
  int i;
};

constinit T t;
struct U : T {
  int j;
};
constinit U u;