From db38a029ee96491c4a4e42f3acdd02a541994ec1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 18 Dec 2019 19:10:47 -0500 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/constexpr.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.30.2