https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94002
--- Comment #4 from CVS 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:0ab503d34f2a8c22262ceefea6c882ae2ff75230 commit r10-6991-g0ab503d34f2a8c22262ceefea6c882ae2ff75230 Author: Jakub Jelinek <ja...@redhat.com> Date: Tue Mar 3 10:42:34 2020 +0100 explow: Fix ICE caused by plus_constant [PR94002] The following testcase ICEs in cross to riscv64-linux. The problem is that we have a DImode integral constant (that doesn't fit into SImode), which is pushed into a constant pool and later access just the first half of it using a MEM. When plus_constant is called on such a MEM, if the constant has mode, we verify the mode, but if it doesn't, we don't and ICE later on when we think the CONST_INT is a valid SImode constant. 2020-03-03 Jakub Jelinek <ja...@redhat.com> PR rtl-optimization/94002 * explow.c (plus_constant): Punt if cst has VOIDmode and get_pool_mode is different from mode. * gcc.dg/pr94002.c: New test.