[Bug middle-end/94206] Wrong optimization: memset of n-bit integer types (from bit-fields) is truncated to n bits (instead of sizeof)
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 2 14:49:29 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94206
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:4b1087f8dc7505997dc475b554b5b86a06c78d69
commit r9-8443-g4b1087f8dc7505997dc475b554b5b86a06c78d69
Author: Richard Biener <rguenther@suse.de>
Date: Wed Mar 18 13:11:30 2020 +0100
middle-end/94206 fix memset folding to avoid types with padding
This makes sure that the store a memset is folded to uses a type
covering all bits.
2020-03-18 Richard Biener <rguenther@suse.de>
PR middle-end/94206
* gimple-fold.c (gimple_fold_builtin_memset): Avoid using
partial int modes or not mode-precision integer types for
the store.
* gcc.dg/torture/pr94206.c: New testcase.
More information about the Gcc-bugs
mailing list