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

struct V
{
    int i;
    double d;
};

struct X
{
    union
    {
        int x;
        V y;
    };
};

X foo()
{
    return {.y = {0, 0.0}};
}