[Bug sanitizer/83392] FAIL: c-c++-common/ubsan/ptr-overflow-sanitization-1.c scan-tree-dump-times
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 13 15:30:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83392
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The difference is in:
486 HOST_WIDE_INT bitpos;
487 base = get_inner_reference (base, &bitsize, &pbitpos, &offset,
&mode,
488 &unsignedp, &reversep, &volatilep);
489 if (offset == NULL_TREE
490 && DECL_P (base)
491 && pbitpos.is_constant (&bitpos))
On 64-bit, offset is non-NULL, sizetype 0x8000000000000001, and pbitpos is 0,
on 32-bit offset is NULL and pbitpos is -17179869176 (i.e. signed HWI
0xfffffffc00000008). The difference is because pbitpos is poly_int16 and 8 *
0x8000000000000001 is not representable in signed HOST_WIDE_INT, while 8 *
0x80000001 is.
More information about the Gcc-bugs
mailing list