aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/decomp41.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp1z/decomp41.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp1z/decomp41.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp41.C b/gcc/testsuite/g++.dg/cpp1z/decomp41.C
new file mode 100644
index 00000000000..1ce836bd6dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1z/decomp41.C
@@ -0,0 +1,9 @@
+// PR c++/85208
+// { dg-do compile { target c++11 } }
+// { dg-require-weak "" }
+// { dg-options "" }
+
+#pragma weak _ZDC1d1e1fE
+struct A { int i, j, k; };
+auto [a, b, c] = A (); // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }
+auto [d, e, f] = A (); // { dg-warning "decomposition declaration only available with" "" { target c++14_down } }