tree.c (build_constructor): Add MEM_STAT_DECL.
authorJason Merrill <jason@redhat.com>
Tue, 18 Jun 2019 16:08:12 +0000 (12:08 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 18 Jun 2019 16:08:12 +0000 (12:08 -0400)
* tree.c (build_constructor): Add MEM_STAT_DECL.

gcc/cp/
* constexpr.c (unshare_constructor): Add MEM_STAT_DECL.

From-SVN: r272428

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/tree.c
gcc/tree.h

index f0a3c39..0993c3d 100644 (file)
@@ -1,3 +1,7 @@
+2019-06-18  Jason Merrill  <jason@redhat.com>
+
+       * tree.c (build_constructor): Add MEM_STAT_DECL.
+
 2019-06-18  Richard Sandiford  <richard.sandiford@arm.com>
 
        * config/aarch64/aarch64-modes.def (CC_NZC): New CC_MODE.
index bab08df..eb795b8 100644 (file)
@@ -1,3 +1,7 @@
+2019-06-18  Jason Merrill  <jason@redhat.com>
+
+       * constexpr.c (unshare_constructor): Add MEM_STAT_DECL.
+
 2019-06-17  Jakub Jelinek  <jakub@redhat.com>
 
        * semantics.c (finish_omp_clauses): For OMP_CLAUSE_REDUCTION_INSCAN
index 8bbabd8..22901f8 100644 (file)
@@ -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<constructor_elt, va_gc> *v = CONSTRUCTOR_ELTS (n);
       constructor_elt *ce;
index 1f4e1e1..98f7a0c 100644 (file)
@@ -7725,7 +7725,7 @@ extern void explain_invalid_constexpr_fn        (tree);
 extern vec<tree> 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);
index e879f15..f65025f 100644 (file)
@@ -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<constructor_elt, va_gc> *vals)
+build_constructor (tree type, vec<constructor_elt, va_gc> *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;
index d45a391..23ac9b1 100644 (file)
@@ -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<constructor_elt, va_gc> *);
+extern tree build_constructor (tree, vec<constructor_elt, va_gc> * 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, ...);