re PR c++/84927 (ICE with NSDMI and reference)
authorMarek Polacek <polacek@redhat.com>
Tue, 20 Mar 2018 18:13:38 +0000 (18:13 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 20 Mar 2018 18:13:38 +0000 (18:13 +0000)
commit1efb1dc2d893db2fa8f15945d506410aab628b60
treecb02f82151fa7f7bd4cef7375f6174ef7a066af4
parentf5f035a336a9a47d326e800e97fe7fbbeede4a99
re PR c++/84927 (ICE with NSDMI and reference)

PR c++/84927
* constexpr.c (cxx_eval_bare_aggregate): Update constructor's flags
as we evaluate the elements.
(cxx_eval_constant_expression): Verify constructor's flags
unconditionally.

* g++.dg/cpp1y/nsdmi-aggr9.C: New test.

From-SVN: r258691
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/nrv19.C [new file with mode: 0644]