PR c++/79143
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / decomp19.C
blobe392e658e27a9cf970eca2eb1ac56afd9e6b88f9
1 // PR c++/78931
2 // { dg-do run { target c++11 } }
3 // { dg-options "" }
5 int
6 main ()
8   int x = 99;
9   struct S { int &x; };
10   S s{x};
11   auto [p] = s;         // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
12   return p - 99;