public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-4653] bootstrap/97666 - fix array of bool allocation
@ 2020-11-03 12:33 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2020-11-03 12:33 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9d1b813d0f7c9a8d80b0aee6eb1418b0afdf0f84
commit r11-4653-g9d1b813d0f7c9a8d80b0aee6eb1418b0afdf0f84
Author: Richard Biener <rguenther@suse.de>
Date: Tue Nov 3 12:06:19 2020 +0100
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).
Diff:
---
gcc/tree-vect-slp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index e97fbe897a7..08018a1d799 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))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-03 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 12:33 [gcc r11-4653] bootstrap/97666 - fix array of bool allocation Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).