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

struct A { int a; struct { int b; }; };
struct B { A d; };

void
foo (B *x)
{
  *x = { .d = { .b = 5 } };	// { dg-message "non-trivial designated initializers not supported" }
}

void
bar (A *x)
{
  *x = { .b = 6 };		// { dg-message "non-trivial designated initializers not supported" }
}