https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105533
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The same function already does offset += pop->off * BITS_PER_UNIT; a few lines earlier, so I think doing it here is fine as well. Or yet another option is to cast pop->off or op->off to offset_int first and do the left shift in offset_int type where it is well defined. 2024-03-06 Jakub Jelinek <ja...@redhat.com> PR middle-end/105533 * tree-ssa-sccvn.cc (ao_ref_init_from_vn_reference) <case ARRAY_REF>: Multiple op->off by BITS_PER_UNIT instead of shifting it left by LOG2_BITS_PER_UNIT. --- gcc/tree-ssa-sccvn.cc.jj 2024-02-28 22:57:18.318658827 +0100 +++ gcc/tree-ssa-sccvn.cc 2024-03-06 14:52:16.819229719 +0100 @@ -1221,7 +1221,7 @@ ao_ref_init_from_vn_reference (ao_ref *r if (maybe_eq (op->off, -1)) max_size = -1; else - offset += op->off << LOG2_BITS_PER_UNIT; + offset += op->off * BITS_PER_UNIT; break; case REALPART_EXPR: