https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90242
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:7c99de1c439dbb149cc6a33a214f22f2df1c88f3 commit r16-2720-g7c99de1c439dbb149cc6a33a214f22f2df1c88f3 Author: Richard Biener <rguent...@suse.de> Date: Fri Aug 1 15:07:15 2025 +0200 tree-optimization/90242 - UBSAN error in vn_reference_compute_hash The following plugs possible overflow issues in vn_reference_compute_hash and possibly in vn_reference_eq. The inchash "integer" adds are a bit of a mess, but I know overloads with different integer types can get messy, so not this time. For hashing simply truncate to 64bits. PR tree-optimization/90242 * tree-ssa-sccvn.cc (vn_reference_compute_hash): Use poly_offset_int for offset accumulation. For hashing truncate to 64 bits and also hash 64 bits. (vn_reference_eq): Likewise.