aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/desig14.C
blob: cfcaa88485c0d446d9455955369649e825ff1b3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/89871
// { dg-do compile { target c++11 } }
// { dg-options "-Wall" }

struct A {};
struct B {};

struct S {
  union {
    A a;
    B b;
  };
};

int main() {
  S s;
  s = S{.a = A{}};
}