Backported from mainline
commitb4744e3ff1ab7f5eb2883f821c76872bfd2148cf
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 May 2018 07:36:49 +0000 (30 07:36 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 May 2018 07:36:49 +0000 (30 07:36 +0000)
tree693e72273c58876a818f8854e40893ebf88e0341
parent3c7512c55b8f9de0b17919747b651a038eabb803
Backported from mainline
2018-05-29  Jakub Jelinek  <jakub@redhat.com>

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@260919 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wunused-var-33.C [new file with mode: 0644]