]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bootstrap/97666 - really fix sizeof (bool) issue
authorRichard Biener <rguenther@suse.de>
Wed, 4 Nov 2020 08:36:05 +0000 (09:36 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 4 Nov 2020 08:37:43 +0000 (09:37 +0100)
Pastoed the previous fix too quickly, the following fixes the
correct spot - the memset, not the allocation.

2020-11-04  Richard Biener  <rguenther@suse.de>

PR bootstrap/97666
* tree-vect-slp.c (vect_build_slp_tree_2): Revert previous
fix and instead adjust the memset.

gcc/tree-vect-slp.c

index 08018a1d799f58712d4476671580432b2d722eb4..11fe685bab8f4099a1f4511dfbf8e64db026b4a9 100644 (file)
@@ -1428,8 +1428,8 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
 
   /* If the SLP node is a PHI (induction or reduction), terminate
      the recursion.  */
-  bool *skip_args = XALLOCAVEC (bool, sizeof (bool) * nops);
-  memset (skip_args, 0, nops);
+  bool *skip_args = XALLOCAVEC (bool, nops);
+  memset (skip_args, 0, sizeof (bool) * nops);
   if (loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo))
     if (gphi *stmt = dyn_cast <gphi *> (stmt_info->stmt))
       {