Avoid needless unsharing during constexpr evaluation (PR c++/70452)
authorPatrick Palka <ppalka@gcc.gnu.org>
Thu, 7 Apr 2016 16:12:05 +0000 (16:12 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Thu, 7 Apr 2016 16:12:05 +0000 (16:12 +0000)
commit0146e25f9098f7ae86a2c4798668784f0928b5af
tree1b70b58146831b251b514bfafe6d51777e32e783
parent9817ae350c2d63997551eb8fab3df34ff70ebd32
Avoid needless unsharing during constexpr evaluation (PR c++/70452)

gcc/cp/ChangeLog:

PR c++/70452
* constexpr.c (find_constructor): New function.
(unshare_constructor): New function.
(cxx_eval_call_expression): Use unshare_constructor instead of
unshare_expr.
(find_array_ctor_elt): Likewise.
(cxx_eval_vec_init_1): Likewise.
(cxx_eval_store_expression): Likewise.
(cxx_eval_constant_expression): Likewise.

From-SVN: r234810
gcc/cp/ChangeLog
gcc/cp/constexpr.c