https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108193
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:cb8022eab6d076325495360da632321078326135 commit r12-9132-gcb8022eab6d076325495360da632321078326135 Author: Jakub Jelinek <ja...@redhat.com> Date: Thu Dec 22 12:44:13 2022 +0100 cse: Fix up CSE const_anchor handling [PR108193] The following testcase ICEs on aarch64, because insert_const_anchor inserts invalid CONST_INT into the CSE tables - 0x80000000 for SImode. The second hunk of the patch fixes that, the first one is to avoid triggering undefined behavior at compile time during compute_const_anchors computations - performing those additions and subtractions in HOST_WIDE_INT means it can overflow for certain constants. 2022-12-22 Jakub Jelinek <ja...@redhat.com> PR rtl-optimization/108193 * cse.cc (compute_const_anchors): Change n type to unsigned HOST_WIDE_INT, adjust comparison against it to avoid warnings. Formatting fix. (insert_const_anchor): Use gen_int_mode instead of GEN_INT. * gfortran.dg/pr108193.f90: New test. (cherry picked from commit 0cb5d7cdbab8e5f8359764ef5f62d93c2bc88552)