diff options
author | Richard Biener <rguenther@suse.de> | 2020-11-03 12:06:19 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-11-03 13:33:37 +0100 |
commit | 9d1b813d0f7c9a8d80b0aee6eb1418b0afdf0f84 (patch) | |
tree | 2c135d9006e59cfc78008dabbeaef02196ab022b /gcc/tree-vect-slp.c | |
parent | ac6affba97130bcbffb21bd9f8ca53c7aac89551 (diff) | |
download | gcc-9d1b813d0f7c9a8d80b0aee6eb1418b0afdf0f84.zip gcc-9d1b813d0f7c9a8d80b0aee6eb1418b0afdf0f84.tar.gz gcc-9d1b813d0f7c9a8d80b0aee6eb1418b0afdf0f84.tar.bz2 |
bootstrap/97666 - fix array of bool allocation
This fixes the bad assumption that sizeof (bool) == 1
2020-11-03 Richard Biener <rguenther@suse.de>
PR bootstrap/97666
* tree-vect-slp.c (vect_build_slp_tree_2): Scale
allocation of skip_args by sizeof (bool).
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index e97fbe8..08018a1 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1428,7 +1428,7 @@ 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, nops); + bool *skip_args = XALLOCAVEC (bool, sizeof (bool) * nops); memset (skip_args, 0, nops); if (loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo)) if (gphi *stmt = dyn_cast <gphi *> (stmt_info->stmt)) |