https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117418
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Hu <hu...@gcc.gnu.org>: https://gcc.gnu.org/g:e41fdca8a290c4d72b1972af8cdfd1dd60af31df commit r12-10813-ge41fdca8a290c4d72b1972af8cdfd1dd60af31df Author: Hu, Lin1 <lin1...@intel.com> Date: Wed Nov 6 15:42:13 2024 +0800 i386: Zero extend 32-bit address to 64-bit with option -mx32 -maddress-mode=long. [PR 117418] -maddress-mode=long let Pmode = DI_mode, so zero extend 32-bit address to 64-bit and uses a 64-bit register as a pointer for avoid raise an ICE. gcc/ChangeLog: PR target/117418 * config/i386/i386-expand.cc (ix86_expand_builtin): Convert pointer's mode according to Pmode. gcc/testsuite/ChangeLog: PR target/117418 * gcc.target/i386/pr117418-1.c: New test. (cherry picked from commit 2272cd2508f1854c880082f792de15e76ec09a99)