From 3da7d774259904b351febd2c2de4eb15cd262ff5 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 18 Jun 2019 12:08:12 -0400 Subject: [PATCH] tree.c (build_constructor): Add MEM_STAT_DECL. * tree.c (build_constructor): Add MEM_STAT_DECL. gcc/cp/ * constexpr.c (unshare_constructor): Add MEM_STAT_DECL. From-SVN: r272428 --- gcc/ChangeLog | 4 ++++ gcc/cp/ChangeLog | 4 ++++ gcc/cp/constexpr.c | 6 +++--- gcc/cp/cp-tree.h | 2 +- gcc/tree.c | 4 ++-- gcc/tree.h | 2 +- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f0a3c391980..0993c3de486 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-06-18 Jason Merrill + + * tree.c (build_constructor): Add MEM_STAT_DECL. + 2019-06-18 Richard Sandiford * config/aarch64/aarch64-modes.def (CC_NZC): New CC_MODE. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bab08df1ce5..eb795b82b31 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2019-06-18 Jason Merrill + + * constexpr.c (unshare_constructor): Add MEM_STAT_DECL. + 2019-06-17 Jakub Jelinek * semantics.c (finish_omp_clauses): For OMP_CLAUSE_REDUCTION_INSCAN diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 8bbabd8ab44..22901f811f1 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -1331,7 +1331,7 @@ adjust_temp_type (tree type, tree temp) modifications don't affect other places where it was used. */ tree -unshare_constructor (tree t) +unshare_constructor (tree t MEM_STAT_DECL) { if (!t || TREE_CODE (t) != CONSTRUCTOR) return t; @@ -1340,8 +1340,8 @@ unshare_constructor (tree t) while (!ptrs.is_empty ()) { tree *p = ptrs.pop (); - tree n = copy_node (*p); - CONSTRUCTOR_ELTS (n) = vec_safe_copy (CONSTRUCTOR_ELTS (*p)); + tree n = copy_node (*p PASS_MEM_STAT); + CONSTRUCTOR_ELTS (n) = vec_safe_copy (CONSTRUCTOR_ELTS (*p) PASS_MEM_STAT); *p = n; vec *v = CONSTRUCTOR_ELTS (n); constructor_elt *ce; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 1f4e1e15554..98f7a0c0cd0 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -7725,7 +7725,7 @@ extern void explain_invalid_constexpr_fn (tree); extern vec cx_error_context (void); extern tree fold_sizeof_expr (tree); extern void clear_cv_and_fold_caches (void); -extern tree unshare_constructor (tree); +extern tree unshare_constructor (tree CXX_MEM_STAT_INFO); /* In cp-ubsan.c */ extern void cp_ubsan_maybe_instrument_member_call (tree); diff --git a/gcc/tree.c b/gcc/tree.c index e879f15a841..f65025f1089 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2023,9 +2023,9 @@ verify_constructor_flags (tree c) /* Return a new CONSTRUCTOR node whose type is TYPE and whose values are in the vec pointed to by VALS. */ tree -build_constructor (tree type, vec *vals) +build_constructor (tree type, vec *vals MEM_STAT_DECL) { - tree c = make_node (CONSTRUCTOR); + tree c = make_node (CONSTRUCTOR PASS_MEM_STAT); TREE_TYPE (c) = type; CONSTRUCTOR_ELTS (c) = vals; diff --git a/gcc/tree.h b/gcc/tree.h index d45a391428e..23ac9b1ff5e 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4247,7 +4247,7 @@ extern tree build_vec_series (tree, tree, tree); extern tree build_index_vector (tree, poly_uint64, poly_uint64); extern void recompute_constructor_flags (tree); extern void verify_constructor_flags (tree); -extern tree build_constructor (tree, vec *); +extern tree build_constructor (tree, vec * CXX_MEM_STAT_INFO); extern tree build_constructor_single (tree, tree, tree); extern tree build_constructor_from_list (tree, tree); extern tree build_constructor_va (tree, int, ...); -- 2.30.2