https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118643
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:52366356fe7b638f66c4011b8a61fb6c22b08087 commit r15-7226-g52366356fe7b638f66c4011b8a61fb6c22b08087 Author: Richard Biener <rguent...@suse.de> Date: Mon Jan 27 11:28:47 2025 +0100 middle-end/118643 - ICE with out-of-bound decl access When RTL expansion of an out-of-bound access of a register falls back to a BIT_FIELD_REF we have to ensure that's valid. The following avoids negative offsets by expanding through a stack temporary. PR middle-end/118643 * expr.cc (expand_expr_real_1): Avoid falling back to BIT_FIELD_REF expansion for negative offset. * gcc.dg/pr118643.c: New testcase.