aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/desig24.C
blob: 219cc9c3b8ed9ff699ff7a9a25dc21a8d72bc9b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/103299
// { dg-do compile { target c++20 } }

struct foo {
  union {
    int fp1{};
    char fp2;
  };
};

static_assert(foo{.fp2={}}.fp2 == 0);