Avoid needless unsharing during constexpr evaluation (PR c++/70452)
authorppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Apr 2016 16:12:05 +0000 (16:12 +0000)
committerppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Apr 2016 16:12:05 +0000 (16:12 +0000)
commite283bb4fe83274c7c6769ab8928cc9fdf0153e6d
tree1b70b58146831b251b514bfafe6d51777e32e783
parent1b61585a37935375c252a27648089c37018f459e
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234810 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c