re PR c++/83993 (ICE: constant not recomputed when ADDR_EXPR changed)
authorJason Merrill <jason@redhat.com>
Wed, 31 Jan 2018 20:46:36 +0000 (21:46 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 31 Jan 2018 20:46:36 +0000 (21:46 +0100)
commiteddd715c77c55f342e41419410fc577f71905800
tree88ce6921e6b3e02d3f87cd5d853b4f38d0780406
parent08b3748ce73c94460f314cb34f21702049650e72
re PR c++/83993 (ICE: constant not recomputed when ADDR_EXPR changed)

PR c++/83993
* constexpr.c (cxx_eval_outermost_constant_expr): Build NOP_EXPR
around non-constant ADDR_EXPRs rather than clearing TREE_CONSTANT
on ADDR_EXPR.

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

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