re PR c++/83993 (ICE: constant not recomputed when ADDR_EXPR changed)
authorJakub Jelinek <jakub@redhat.com>
Wed, 31 Jan 2018 20:45:41 +0000 (21:45 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 31 Jan 2018 20:45:41 +0000 (21:45 +0100)
commit08b3748ce73c94460f314cb34f21702049650e72
tree4aa63514381983678f6850e2ca0d9829a59a773f
parent1af734911a08c4cb41046cb0e0ffe2206dcdf142
re PR c++/83993 (ICE: constant not recomputed when ADDR_EXPR changed)

PR c++/83993
* constexpr.c (diag_array_subscript): Emit different diagnostics
if TYPE_DOMAIN (arraytype) is NULL.
(cxx_eval_array_reference, cxx_eval_store_expression): For arrays
with NULL TYPE_DOMAIN use size_zero_node as nelts.

* g++.dg/init/pr83993-1.C: New test.
* g++.dg/cpp0x/pr83993.C: New test.

From-SVN: r257264
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr83993.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/pr83993-1.C [new file with mode: 0644]