re PR c++/80984 (ICE with label/variable ambiguity)
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Jun 2017 20:02:38 +0000 (22:02 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Jun 2017 20:02:38 +0000 (22:02 +0200)
commitc60dc05326dbf6960dbaa898db854fd062afeecd
tree4ad7f49cb5b7a62ef3ce69d6f77d52c239c2b228
parente2fea9319edd5ccd8e94f8b2c6fd3c7061b923fa
re PR c++/80984 (ICE with label/variable ambiguity)

PR c++/80984
* cp-gimplify.c (cp_genericize): Only look for VAR_DECLs in
BLOCK_VARS (outer) chain.
(cxx_omp_const_qual_no_mutable): Likewise.

* g++.dg/opt/nrv18.C: New test.

From-SVN: r249173
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/nrv18.C [new file with mode: 0644]