From: Jason Merrill Date: Thu, 19 Dec 2019 00:10:47 +0000 (-0500) Subject: PR c++/91165 follow-on tweak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db38a029ee96491c4a4e42f3acdd02a541994ec1;p=gcc.git PR c++/91165 follow-on tweak I talked in the PR about possibly stripping the location from the args in the hash table, since if we use the cache the locations would be wrong, but didn't actually do anything about that. Then I noticed that there's already unshare_expr_without_location... * constexpr.c (cxx_eval_call_expression): Use unshare_expr_without_location. From-SVN: r279557 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 05ca5ec72a2..19e1b881e2d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-12-18 Jason Merrill + + PR c++/91165 follow-on tweak + * constexpr.c (cxx_eval_call_expression): Use + unshare_expr_without_location. + 2019-12-19 Julian Brown Maciej W. Rozycki Tobias Burnus diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 87d78d26728..b95da0f8342 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -2079,7 +2079,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, /* Unshare args going into the hash table to separate them from the caller's context, for better GC and to avoid problems with verify_gimple. */ - arg = unshare_expr (arg); + arg = unshare_expr_without_location (arg); TREE_VEC_ELT (bound, i) = arg; } /* Don't share a CONSTRUCTOR that might be changed. This is not