This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/83392] FAIL: c-c++-common/ubsan/ptr-overflow-sanitization-1.c scan-tree-dump-times
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Mar 2018 15:29:59 +0000
- Subject: [Bug sanitizer/83392] FAIL: c-c++-common/ubsan/ptr-overflow-sanitization-1.c scan-tree-dump-times
- Auto-submitted: auto-generated
- References: <bug-83392-4@http.gcc.gnu.org/bugzilla/>
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.