testsuite: update mangling
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / paren-init13.C
blob31c7d4e1669c2daf32c7457d8bce66fd3efd4296
1 // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2 // { dg-do compile { target c++20 } }
4 struct X { int a, b; };
5 struct Y { X x; };
7 void
8 f()
10   // This is ok...
11   Y y1{{1, 2}};
12   Y y2({1, 2});
13   // ...but Y y((1,2)) is not the same as Y y{{1,2}}.  (1, 2) is a
14   // COMPOUND_EXPR.
15   Y y3((1, 2)); // { dg-error "could not convert" }