re PR c++/84578 (ICE with flexible array member and constexpr)
authorMarek Polacek <polacek@redhat.com>
Fri, 2 Mar 2018 20:27:46 +0000 (20:27 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 2 Mar 2018 20:27:46 +0000 (20:27 +0000)
commit74f8705ebe6ebf42bcfb46cf1c9a26a5ab3bace8
treea0f91afc6bbf3b1c8e6c28f30a34ed6d42991a56
parentb2353e5931b1c06053d35c13b9e03f62aca0866c
re PR c++/84578 (ICE with flexible array member and constexpr)

PR c++/84578
* constexpr.c (get_array_or_vector_nelts): New.
(cxx_eval_array_reference): Use it.
(cxx_eval_vec_init_1): Likewise.
(cxx_eval_store_expression): Likewise.

* g++.dg/ext/flexary29.C: New test.

From-SVN: r258156
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/flexary29.C [new file with mode: 0644]