| 1 |
// PR c++/87032 |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
|
| 4 |
struct f1 {int x,y;}; |
| 5 |
struct f2 {int x,y,z,t;}; |
| 6 |
|
| 7 |
struct T { |
| 8 |
const char * name; |
| 9 |
union { |
| 10 |
struct f1 fn1; |
| 11 |
struct f2 fn2; |
| 12 |
} d; |
| 13 |
}; |
| 14 |
|
| 15 |
extern "C" void p(struct T); |
| 16 |
|
| 17 |
int main(){ |
| 18 |
p({"%x",{.fn2={1,2,3,4}}}); |
| 19 |
} |