aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-12-18 19:10:47 -0500
committerJason Merrill <jason@gcc.gnu.org>2019-12-18 19:10:47 -0500
commitdb38a029ee96491c4a4e42f3acdd02a541994ec1 (patch)
treebac90309f5013cccbf87e44d1567a363b39ed690
parent6d4a35ca57b1af5a7a97faedb8a17c0a00890ce4 (diff)
downloadgcc-db38a029ee96491c4a4e42f3acdd02a541994ec1.zip
gcc-db38a029ee96491c4a4e42f3acdd02a541994ec1.tar.gz
gcc-db38a029ee96491c4a4e42f3acdd02a541994ec1.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/constexpr.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 05ca5ec..19e1b88 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/91165 follow-on tweak
+ * constexpr.c (cxx_eval_call_expression): Use
+ unshare_expr_without_location.
+
2019-12-19 Julian Brown <julian@codesourcery.com>
Maciej W. Rozycki <macro@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 87d78d2..b95da0f 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