This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/82491] UBSAN in gcc/gimple-fold.c:6187:6: runtime error: signed integer overflow: 9223372036854775807 * 8 cannot be represented in type 'long int'
- From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Feb 2018 19:06:56 +0000
- Subject: [Bug tree-optimization/82491] UBSAN in gcc/gimple-fold.c:6187:6: runtime error: signed integer overflow: 9223372036854775807 * 8 cannot be represented in type 'long int'
- Auto-submitted: auto-generated
- References: <bug-82491-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82491
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #3)
> I haven't finished that before poly-int went it.
> May I please ask Richard Sandiford to help me with the version of the patch
> after we have poly-int in trunk?
The poly_int version of the comment #1 code would be something like:
poly_offset_int boff = *bit_offset + mem_ref_offset (base) * BITS_PER_UNIT;
if (!boff.to_shwi (bit_offset))
return NULL_TREE;