https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116321
--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to GCC Commits from comment #6)
> The PR is about an existing testcase that fails with LRA on m86k.
>
> gcc/
> PR middle-end/116321
> * lra-constraints.cc (get_hard_regno): Only apply eliminations
> to existing hard registers.
> (get_reg_class): Likewise.
Hi Richard, as far as I can tell the bug is still somewhere in LRA.
With your patch and -Os like in the initial report, the test compiles fine.
But with -O0, it still breaks:
$ avr-gcc -S lra-bug.c -O0 -mlra
lra-bug.c:6:1: internal compiler error: in get_reload_reg, at
lra-constraints.cc:755
6 | }
| ^
gcc version 15.0.0 20240829 (experimental) (GCC)
...ok, the ICE is actually from a different place now (LRA instead of backend),
so the remaining ICE is PR116326 I guess?