https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101170
--- Comment #6 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:9872bd8c35be0f4d475fac739115cf5b82cdabc0 commit r12-1772-g9872bd8c35be0f4d475fac739115cf5b82cdabc0 Author: Jakub Jelinek <ja...@redhat.com> Date: Thu Jun 24 12:24:48 2021 +0200 df: Fix up handling of paradoxical subregs in debug insns [PR101170] The recent addition of gcc_assert (regno < endregno); triggers during glibc build on m68k. The problem is that RA decisions shouldn't depend on expressions in DEBUG_INSNs and those expressions can contain paradoxical subregs of certain pseudos. If RA then decides to allocate the pseudo to a register with very small hard register REGNO, we can trigger the new assert, as (int) subreg_regno_offset may be negative on big endian and the small REGNO + the negative offset can wrap around. The following patch in that case records the range from the REGNO 0 to endregno, before the addition of the assert as both regno and endregno are unsigned it wouldn't record anything at all silently. 2021-06-24 Jakub Jelinek <ja...@redhat.com> PR middle-end/101170 * df-scan.c (df_ref_record): For paradoxical big-endian SUBREGs where regno + subreg_regno_offset wraps around use 0 as starting regno. * gcc.dg/pr101170.c: New test.