From: Jakub Jelinek Date: Fri, 8 Mar 2019 18:31:27 +0000 (+0100) Subject: re PR c++/82075 (structured binding fails with empty base class) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6fbaad21546a628edfc44ba6b2db419504d16203;p=gcc.git re PR c++/82075 (structured binding fails with empty base class) PR c++/82075 * g++.dg/cpp1z/decomp49.C: New test. From-SVN: r269504 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 13b91c7965c..baa3126e6ad 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-03-08 Jakub Jelinek + + PR c++/82075 + * g++.dg/cpp1z/decomp49.C: New test. + 2019-03-08 Andre Vieira * gcc.target/arm/f16_f64_conv_no_dp.c: New test. diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp49.C b/gcc/testsuite/g++.dg/cpp1z/decomp49.C new file mode 100644 index 00000000000..525eb45af51 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/decomp49.C @@ -0,0 +1,14 @@ +// PR c++/82075 +// { dg-do run { target c++11 } } +// { dg-options "" } + +struct B { }; +struct D : B { int i; }; + +int +main () +{ + auto [i] = D{}; // { dg-warning "only available with" "" { target c++14_down } } + if (i != 0) + __builtin_abort (); +}