This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/83392] FAIL: c-c++-common/ubsan/ptr-overflow-sanitization-1.c scan-tree-dump-times


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]