https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113459
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:dcd5601c2b7298155c9a8e1bfb93ee8e952eca0b commit r14-8276-gdcd5601c2b7298155c9a8e1bfb93ee8e952eca0b Author: Jakub Jelinek <ja...@redhat.com> Date: Fri Jan 19 10:00:16 2024 +0100 sccvn: Don't use SCALAR_INT_TYPE_MODE on BLKmode BITINT_TYPEs [PR113459] sccvn uses GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)) for INTEGER_TYPEs, most likely because that is what native_{interpret,encode}_int used. This obviously doesn't work for larger BITINT_TYPEs which have BLKmode and the above ICEs on those. native_{interpret,encode}_int checks whether the BITINT_TYPE is medium/large/huge (i.e. an array of 2+ ABI limbs) and uses TYPE_SIZE_UNIT for that case, otherwise SCALAR_INT_TYPE_MODE like for the INTEGER_TYPE case. The following patch instead just uses SCALAR_INT_TYPE_MODE for non-BLKmode TYPE_MODE and TYPE_SIZE_UNIT otherwise. 2024-01-19 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/113459 * tree-ssa-sccvn.cc (vn_walk_cb_data::push_partial_def): Use TREE_INT_CST_LOW of TYPE_SIZE_UNIT rather than GET_MODE_SIZE of SCALAR_INT_TYPE_MODE if type has BLKmode. (vn_reference_lookup_3): Likewise. Formatting fix. * gcc.dg/bitint-73.c: New test.