aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-02-27 10:12:52 +0100
committerJakub Jelinek <jakub@redhat.com>2020-02-27 10:12:52 +0100
commit5f9cd512c4278621435cce486dd00248ea2e821c (patch)
treedffe17c1326c8d4b3bea8892207a7e4e8eafa587 /gcc/dwarf2out.c
parent4fd9efc8877814e8cda506563d0282a267c562c8 (diff)
downloadgcc-5f9cd512c4278621435cce486dd00248ea2e821c.zip
gcc-5f9cd512c4278621435cce486dd00248ea2e821c.tar.gz
gcc-5f9cd512c4278621435cce486dd00248ea2e821c.tar.bz2
sccvn: Handle non-byte aligned offset or size for memset (, 123, ) [PR93945]
The following is the last spot in vn_reference_lookup_3 that didn't allow non-byte aligned offsets or sizes. To be precise, it did allow size that wasn't multiple of byte size and that caused a wrong-code issue on big-endian, as the pr93945.c testcase shows, so for GCC 9 we should add && multiple_p (ref->size, BITS_PER_UNIT) check instead. For the memset with SSA_NAME middle-argument, it still requires byte-aligned offset, as we'd otherwise need to rotate the value at runtime. 2020-02-27 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/93582 PR tree-optimization/93945 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle memset with non-zero INTEGER_CST second argument and ref->offset or ref->size not a multiple of BITS_PER_UNIT. * gcc.dg/tree-ssa/pr93582-9.c: New test. * gcc.c-torture/execute/pr93945.c: New test.
Diffstat (limited to 'gcc/dwarf2out.c')
0 files changed, 0 insertions, 0 deletions