Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr23.C

raw
1 // PR c++/116015
2 // { dg-do compile { target c++14 } }
3 // { dg-additional-options "-Wno-c++20-extensions" }
4
5 struct MatrixLayout {
6 int rows = 0;
7 int outer_stride = rows;
8 };
9 struct Matrix {
10 Matrix(MatrixLayout m) {}
11 };
12 struct Widget {
13 int n = 5;
14 Matrix A0{{}};
15 Matrix A1{{n}};
16 Matrix A1_{{.rows = n}};
17 Matrix A2{{n, n}};
18 };
19
20 int
21 main ()
22 {
23 Widget w{};
24 Widget w1;
25 Widget w2 = {};
26 }