OSDN Git Service

* gcc.dg/darwin-20040809-2.c: Don't expect default debugging
[pf3gnuchains/gcc-fork.git] / gcc / tree-object-size.c
index 01eb381..068bacf 100644 (file)
@@ -50,7 +50,7 @@ static void expr_object_size (struct object_size_info *, tree, tree);
 static bool merge_object_sizes (struct object_size_info *, tree, tree,
                                unsigned HOST_WIDE_INT);
 static bool plus_expr_object_size (struct object_size_info *, tree, tree);
-static void compute_object_sizes (void);
+static unsigned int compute_object_sizes (void);
 static void init_offset_limit (void);
 static void check_for_plus_in_loops (struct object_size_info *, tree);
 static void check_for_plus_in_loops_1 (struct object_size_info *, tree,
@@ -386,8 +386,8 @@ compute_builtin_object_size (tree ptr, int object_size_type)
                 E.g. p = &buf[0]; while (cond) p = p + 4;  */
              if (object_size_type & 2)
                {
-                 osi.depths = xcalloc (num_ssa_names, sizeof (unsigned int));
-                 osi.stack = xmalloc (num_ssa_names * sizeof (unsigned int));
+                 osi.depths = XCNEWVEC (unsigned int, num_ssa_names);
+                 osi.stack = XNEWVEC (unsigned int, num_ssa_names);
                  osi.tos = osi.stack;
                  osi.pass = 1;
                  /* collect_object_sizes_for is changing
@@ -956,8 +956,7 @@ init_object_sizes (void)
 
   for (object_size_type = 0; object_size_type <= 3; object_size_type++)
     {
-      object_sizes[object_size_type]
-       = xmalloc (num_ssa_names * sizeof (HOST_WIDE_INT));
+      object_sizes[object_size_type] = XNEWVEC (unsigned HOST_WIDE_INT, num_ssa_names);
       computed[object_size_type] = BITMAP_ALLOC (NULL);
     }
 
@@ -983,7 +982,7 @@ fini_object_sizes (void)
 
 /* Simple pass to optimize all __builtin_object_size () builtins.  */
 
-static void
+static unsigned int
 compute_object_sizes (void)
 {
   basic_block bb;
@@ -1055,6 +1054,7 @@ compute_object_sizes (void)
     }
 
   fini_object_sizes ();
+  return 0;
 }
 
 struct tree_opt_pass pass_object_sizes =