re PR c++/85952 (Bogus -Wunused-but-set-variable warning with array structured binding)
authorJakub Jelinek <jakub@redhat.com>
Tue, 29 May 2018 17:07:57 +0000 (19:07 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 29 May 2018 17:07:57 +0000 (19:07 +0200)
commit69ce0c8c77e177c138e59d11434676f81425999c
tree2388274854b71291d640d9534de36845f1f12e08
parentfec0bf3084f5d5531fcdc81e13b4813db31a1750
re PR c++/85952 (Bogus -Wunused-but-set-variable warning with array structured binding)

PR c++/85952
* init.c (build_aggr_init): For structured binding initialized from
array call mark_rvalue_use on the initializer.

* g++.dg/warn/Wunused-var-33.C: New test.

From-SVN: r260899
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wunused-var-33.C [new file with mode: 0644]