PR c++/83993
commit1d29f4ea088f5d6dd09f90b8fa51357eb42c663f
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 2018 20:46:36 +0000 (31 20:46 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Jan 2018 20:46:36 +0000 (31 20:46 +0000)
tree88ce6921e6b3e02d3f87cd5d853b4f38d0780406
parentd7d265dbfd3bf13bd40e70f0b7bbde148fbbf4bc
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257265 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/pr83993-2.C [new file with mode: 0644]