aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/desig17.C
blob: 8f55c549ca2df1789288d9a7d9592c67384986fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/87032
// { dg-do compile { target c++20 } }

struct f1 {int x,y;};
struct f2 {int x,y,z,t;};

struct T {
const char * name;
union {
       struct f1  fn1;
       struct f2  fn2;
} d;
};

extern "C" void p(struct T);

int main(){
p({"%x",{.fn2={1,2,3,4}}});
}