[Bug tree-optimization/81603] Various compiler UB on very large constant offsets
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 31 07:32:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81603
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well, yes - offset_int is basically former double_int and thus good for
addresses/offsets measured in bits.
Of course in this case why do we need the offset in bits at all? ...
That said, we're looking at an ADDR_EXPR here, so we know bitsize %
BITS_PER_UNIT == 0. Given we reject max_size == -1 this code could have used
get_addr_base_and_unit_offset instead and avoid bit precision stuff.
More information about the Gcc-bugs
mailing list